Class SingleServerClusterManager

  • All Implemented Interfaces:
    IClusterManager

    public class SingleServerClusterManager
    extends AbstractClusterManager
    The cluster manager implementation for single server (without cluster) deployment. In a single server environment the sending process triggers the receiving process immediately. As a consequence of this, the transmission consequences happens synchronously, but the same may not happen at a multi-server environment.
    Since:
    4.0.0
    Version:
    $Revision: 26004 $ $Date: 2023-11-22 15:13:28 -0300 (Wed, 22 Nov 2023) $
    • Constructor Detail

      • SingleServerClusterManager

        public SingleServerClusterManager()
    • Method Detail

      • init

        public void init()
        Description copied from interface: IClusterManager
        Initializes the cluster manager. This method should start the monitoring and connections necessary for the cluster manager to execute its communications.
        Specified by:
        init in interface IClusterManager
        Overrides:
        init in class AbstractClusterManager
      • call

        public <T extends java.io.Serializable> T call​(IClusterCommand<T> command)
                                                throws java.lang.Exception
        Description copied from interface: IClusterManager
        Calls a cluster command execution and returns the result of the local execution.

        This method sends the command through the cluster and gives feedback on the local server execution, in the form of the return value and the raised exception.

        It is important to notice that the command will be sent over the cluster despite its execution outcome.

        The given command must have been created through IClusterManager.createClusterCommand(IClusterCallable).

        Parameters:
        command - the command to execute through the cluster.
        Returns:
        the command execution outcome.
        Throws:
        java.lang.Exception - the exception thrown during command execution or other unknown exception.
      • getMembers

        public java.util.Collection<IClusterMember> getMembers()
        Description copied from interface: IClusterManager
        Returns a collection with information about the current members of this cluster.
        Returns:
        a collection with information about the current members of this cluster.
      • getLocalMember

        public IClusterMember getLocalMember()
        Description copied from interface: IClusterManager
        Returns the current cluster member object. The object returned represents the member where this method is executed on.
        Returns:
        this server cluster member object.
      • getClusterConfig

        public IClusterConfig getClusterConfig​(ITransaction transaction)
                                        throws PortalException
        Description copied from interface: IClusterManager
        Returns a persistent cluster configuration object. The object contains the cluster configurations, and any changes will be applied on transaction commit.
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        a persistent cluster configuration instance.
        Throws:
        PortalException