java.lang.Object
org.apache.activemq.artemis.core.server.impl.Activation
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
PrimaryActivation, PrimaryOnlyActivation, ReplicationBackupActivation, SharedNothingBackupActivation, SharedStoreBackupActivation

public abstract class Activation extends Object implements Runnable
An activation controls the lifecycle of the server and any components specific to the Activation itself.
  • Constructor Details

    • Activation

      public Activation()
  • Method Details

    • close

      public abstract void close(boolean permanently, boolean restarting) throws Exception
      Throws:
      Exception
    • freezeConnections

      public void freezeConnections(RemotingService remotingService)
      freeze the connection but allow the Activation to over ride this and decide if any connections should be left open.
    • postConnectionFreeze

      public void postConnectionFreeze()
      allow the activation to override this if it needs to tidy up after freezing the connection. it's a different method as it's called outside of the lock that the previous method is.
    • preStorageClose

      public void preStorageClose() throws Exception
      called before the server is closing the journals so the activation can tidy up stuff
      Throws:
      Exception
    • sendPrimaryIsStopping

      public void sendPrimaryIsStopping()
      called by the server to notify the Activation that the server is stopping
    • haStarted

      public void haStarted()
      called by the ha manager to notify the Activation that HA is now active
    • getActivationChannelHandler

      public ChannelHandler getActivationChannelHandler(Channel channel, Acceptor acceptorUsed)
      allows the Activation to register a channel handler so it can handle any packets that are unique to the Activation
    • getHAManager

      public HAManager getHAManager()
      Returns the HA manager used for this Activation.
      Returns:
      the HA manager used for this Activation
    • createJournalLoader

      public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, ActiveMQServer parentServer) throws ActiveMQException
      create the Journal loader needed for this Activation.
      Throws:
      ActiveMQException
    • getReplicationManager

      public ReplicationManager getReplicationManager()
    • isReplicaSync

      public boolean isReplicaSync()