Class CoordinationServiceFactory

    • Constructor Detail

      • CoordinationServiceFactory

        public CoordinationServiceFactory()
    • Method Detail

      • getNioThreads

        public int getNioThreads()
        Returns the size of a thread pool for handling NIO-based socket connections.
        Returns:
        Size of a thread pool for handling NIO-based socket connections.
      • setNioThreads

        public void setNioThreads​(int nioThreads)
        Sets the size of a thread pool for handling NIO-based socket connections.

        If this parameter is less than or equals to zero (default value) then this channel will use the core thread pool of NetworkService (see NetworkServiceFactory.setNioThreads(int)).

        Parameters:
        nioThreads - Size of a thread pool for handling NIO-based socket connections.
      • withNioThreads

        public CoordinationServiceFactory withNioThreads​(int nioThreads)
        Fluent-style version of setNioThreads(int).
        Parameters:
        nioThreads - Size of a thread pool for handling NIO-based socket connections.
        Returns:
        This instance.
      • getRetryInterval

        public long getRetryInterval()
        Returns the time interval in milliseconds between retry attempts in case of network communication failures (see setRetryInterval(long)).
        Returns:
        Time interval in milliseconds.
      • setRetryInterval

        public void setRetryInterval​(long retryInterval)
        Sets the time interval in milliseconds between retry attempts in case of network communication failures.

        Value of this parameter must be above zero. Default value is 50.

        Parameters:
        retryInterval - Time interval in milliseconds.
      • getProcesses

        public List<CoordinationProcessConfig> getProcesses()
        Returns the list of coordination process configurations that should be automatically registered during the coordination service startup (see setProcesses(List)).
        Returns:
        Coordination processes configuration.
      • setProcesses

        public void setProcesses​(List<CoordinationProcessConfig> processes)
        Sets the list of coordination process configurations that should be automatically registered during the coordination service startup.
        Parameters:
        processes - Coordination processes configuration..
      • setConfigProviders

        public void setConfigProviders​(List<CoordinationConfigProvider> configProviders)
        Sets the list of coordination process configuration providers.
        Parameters:
        configProviders - Coordination process configuration providers.
        See Also:
        CoordinationConfigProvider
      • getIdleSocketTimeout

        public long getIdleSocketTimeout()
        Returns the idle socket timeout in milliseconds (see setIdleSocketTimeout(long)).
        Returns:
        Idle socket timeout in milliseconds.
      • setIdleSocketTimeout

        public void setIdleSocketTimeout​(long idleSocketTimeout)
        Sets idle socket timeout in milliseconds.

        If there were no communication with some remote node for the duration of this time interval then all sockets connections with such node will be closed in order to save system resource. Connections will be automatically reestablish on the next attempt to send a message to that node.

        If value of this parameter is less than or equals to zero then connections will not be closed while remote node stays alive.

        Default value of this parameter is 60000L.

        Parameters:
        idleSocketTimeout - Timeout in milliseconds.