Class ReplicationPrimaryActivation
java.lang.Object
org.apache.activemq.artemis.core.server.impl.Activation
org.apache.activemq.artemis.core.server.impl.PrimaryActivation
org.apache.activemq.artemis.core.server.impl.ReplicationPrimaryActivation
- All Implemented Interfaces:
Runnable,org.apache.activemq.artemis.lockmanager.DistributedLock.UnavailableLockListener
public class ReplicationPrimaryActivation
extends PrimaryActivation
implements org.apache.activemq.artemis.lockmanager.DistributedLock.UnavailableLockListener
This is going to be
run() just by natural born primary, at the first start. Both during a failover or a
failback, run() isn't going to be used, but only getActivationChannelHandler(Channel, Acceptor).-
Constructor Summary
ConstructorsConstructorDescriptionReplicationPrimaryActivation(ActiveMQServerImpl activeMQServer, org.apache.activemq.artemis.lockmanager.DistributedLockManager distributedManager, ReplicationPrimaryPolicy policy) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyCoordinationId(String coordinationId, ActiveMQServerImpl activeMQServer) voidclose(boolean permanently, boolean restarting) voidfreezeConnections(RemotingService remotingService) freeze the connection but allow the Activation to over ride this and decide if any connections should be left open.getActivationChannelHandler(Channel channel, Acceptor acceptorUsed) allows the Activation to register a channel handler so it can handle any packets that are unique to the Activationorg.apache.activemq.artemis.lockmanager.DistributedLockManagerused for testing purposes.booleanvoidvoidrun()voidcalled by the server to notify the Activation that the server is stoppingMethods inherited from class org.apache.activemq.artemis.core.server.impl.Activation
createJournalLoader, getHAManager, haStarted, postConnectionFreeze, preStorageClose
-
Constructor Details
-
ReplicationPrimaryActivation
public ReplicationPrimaryActivation(ActiveMQServerImpl activeMQServer, org.apache.activemq.artemis.lockmanager.DistributedLockManager distributedManager, ReplicationPrimaryPolicy policy)
-
-
Method Details
-
getDistributedManager
public org.apache.activemq.artemis.lockmanager.DistributedLockManager getDistributedManager()used for testing purposes. -
freezeConnections
Description copied from class:Activationfreeze the connection but allow the Activation to over ride this and decide if any connections should be left open.- Overrides:
freezeConnectionsin classActivation
-
run
public void run() -
applyCoordinationId
public static void applyCoordinationId(String coordinationId, ActiveMQServerImpl activeMQServer) throws Exception - Throws:
Exception
-
getActivationChannelHandler
Description copied from class:Activationallows the Activation to register a channel handler so it can handle any packets that are unique to the Activation- Overrides:
getActivationChannelHandlerin classActivation
-
close
- Specified by:
closein classActivation- Throws:
Exception
-
sendPrimaryIsStopping
public void sendPrimaryIsStopping()Description copied from class:Activationcalled by the server to notify the Activation that the server is stopping- Overrides:
sendPrimaryIsStoppingin classActivation
-
getReplicationManager
- Overrides:
getReplicationManagerin classActivation
-
isReplicaSync
public boolean isReplicaSync()- Overrides:
isReplicaSyncin classActivation
-