Class MessagingConfigBase<T extends MessagingConfigBase<T>>

  • Type Parameters:
    T - Syb-class type.
    Direct Known Subclasses:
    MessagingChannelConfig, RpcServiceFactory

    public abstract class MessagingConfigBase<T extends MessagingConfigBase<T>>
    extends Object
    Common configuration options for components that provide messaging support.
    • Constructor Detail

      • MessagingConfigBase

        public MessagingConfigBase()
    • Method Detail

      • 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 (default value) then connections will not be closed while remote node stays alive.

        Parameters:
        idleSocketTimeout - Timeout in milliseconds.
      • withIdleSocketTimeout

        public T withIdleSocketTimeout​(long idleTimeout)
        Fluent-style version of setIdleSocketTimeout(long).
        Parameters:
        idleTimeout - Timeout in milliseconds.
        Returns:
        This instance.
      • getNioThreads

        public int getNioThreads()
        Returns the size of a thread pool for handling NIO-based socket connections (see setNioThreads(int)).
        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 T 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.