Class BackupManager

All Implemented Interfaces:
MBeanRegistration, DistributedManager, ClusterManager, JmxEnabled, Lifecycle, Manager, AbstractReplicatedMap.MapOwner

public class BackupManager extends ClusterManagerBase implements AbstractReplicatedMap.MapOwner, DistributedManager
  • Field Details

    • sm

      protected static final StringManager sm
      The string manager for this package.

      protected static final long DEFAULT_REPL_TIMEOUT
      See Also:
    • name

      protected String name
      The name of this manager
  • Constructor Details

    • BackupManager

      public BackupManager()
      Constructor, just calls super()
  • Method Details

    • messageDataReceived

      public void messageDataReceived(ClusterMessage msg)
      Description copied from interface: ClusterManager
      A message was received from another node, this is the callback method to implement if you are interested in receiving replication messages.
      Specified by:
      messageDataReceived in interface ClusterManager
      msg - - the message received.
    • requestCompleted

      public ClusterMessage requestCompleted(String sessionId)
      Description copied from interface: ClusterManager
      When the request has been completed, the replication valve will notify the manager, and the manager will decide whether any replication is needed or not. If there is a need for replication, the manager will create a session message and that will be replicated. The cluster determines where it gets sent.
      Specified by:
      requestCompleted in interface ClusterManager
      sessionId - - the sessionId that just completed.
      a SessionMessage to be sent.
    • objectMadePrimary

      public void objectMadePrimary(Object key, Object value)
      Specified by:
      objectMadePrimary in interface AbstractReplicatedMap.MapOwner
    • createEmptySession

      public Session createEmptySession()
      Description copied from interface: Manager
      Get a session from the recycled ones or create a new empty one. The PersistentManager manager does not need to create session data because it reads it from the Store.
      Specified by:
      createEmptySession in interface Manager
      createEmptySession in class ManagerBase
      An empty Session object
    • getName

      public String getName()
      Description copied from interface: ClusterManager
      Return the name of the manager, at host /context name and at engine hostname+/context.
      Specified by:
      getName in interface ClusterManager
      getName in class ManagerBase
      The descriptive short name of this Manager implementation.
    • startInternal

      protected void startInternal() throws LifecycleException
      Start this component and implement the requirements of LifecycleBase.startInternal(). Starts the cluster communication channel, this will connect with the other nodes in the cluster, and request the current session state to be transferred to this node.
      startInternal in class ClusterManagerBase
      LifecycleException - if this component detects a fatal error that prevents this component from being used
    • getMapName

      public String getMapName()
    • stopInternal

      protected void stopInternal() throws LifecycleException
      Stop this component and implement the requirements of LifecycleBase.stopInternal(). This will disconnect the cluster communication channel and stop the listener thread.
      stopInternal in class ClusterManagerBase
      LifecycleException - if this component detects a fatal error that prevents this component from being used
    • setName

      public void setName(String name)
      Description copied from interface: ClusterManager
      Set the name of the manager, at host /context name and at engine hostname+/context
      Specified by:
      setName in interface ClusterManager
      name - The manager name
    • setMapSendOptions

      public void setMapSendOptions(int mapSendOptions)
    • setMapSendOptions

      public void setMapSendOptions(String mapSendOptions)
    • getMapSendOptions

      public int getMapSendOptions()
    • getMapSendOptionsName

      public String getMapSendOptionsName()
      returns the SendOptions as a comma separated list of names
      a comma separated list of the option names
    • setRpcTimeout

      public void setRpcTimeout(long rpcTimeout)
    • getRpcTimeout

      public long getRpcTimeout()
    • setTerminateOnStartFailure

      public void setTerminateOnStartFailure(boolean terminateOnStartFailure)
    • isTerminateOnStartFailure

      public boolean isTerminateOnStartFailure()
    • getAccessTimeout

      public long getAccessTimeout()
    • setAccessTimeout

      public void setAccessTimeout(long accessTimeout)
    • getInvalidatedSessions

      public String[] getInvalidatedSessions()
      Description copied from interface: ClusterManager
      When the manager expires session not tied to a request. The cluster will periodically ask for a list of sessions that should expire and that should be sent across the wire.
      Specified by:
      getInvalidatedSessions in interface ClusterManager
      String[] The invalidated sessions
    • cloneFromTemplate

      public ClusterManager cloneFromTemplate()
      Specified by:
      cloneFromTemplate in interface ClusterManager
      a clone of a template manager configuration
    • getActiveSessionsFull

      public int getActiveSessionsFull()
      Description copied from interface: DistributedManager
      Returns the total session count for primary, backup and proxy.
      Specified by:
      getActiveSessionsFull in interface DistributedManager
      The total session count across the cluster.
    • getSessionIdsFull

      public Set<String> getSessionIdsFull()
      Description copied from interface: DistributedManager
      Returns the list of all sessions IDS (primary, backup and proxy).
      Specified by:
      getSessionIdsFull in interface DistributedManager
      The complete set of sessions IDs across the cluster.