Class ConnectionProfile


  • public final class ConnectionProfile
    extends java.lang.Object
    A connection profile describes how many connection are established to specific node for each of the available request types. (TransportRequestOptions.Type). This allows to tailor a connection towards a specific usage.
    • Method Detail

      • buildDefaultConnectionProfile

        public static ConnectionProfile buildDefaultConnectionProfile​(Settings settings)
        Builds a default connection profile based on the provided settings.
        Parameters:
        settings - to build the connection profile from
        Returns:
        the connection profile
      • buildSingleChannelProfile

        public static ConnectionProfile buildSingleChannelProfile​(TransportRequestOptions.Type channelType)
        Builds a connection profile that is dedicated to a single channel type. Use this when opening single use connections
      • getConnectTimeout

        public TimeValue getConnectTimeout()
        Returns the connect timeout or null if no explicit timeout is set on this profile.
      • getHandshakeTimeout

        public TimeValue getHandshakeTimeout()
        Returns the handshake timeout or null if no explicit timeout is set on this profile.
      • getPingInterval

        public TimeValue getPingInterval()
        Returns the ping interval or null if no explicit ping interval is set on this profile.
      • getCompressionEnabled

        public java.lang.Boolean getCompressionEnabled()
        Returns boolean indicating if compression is enabled or null if no explicit compression is set on this profile.
      • getNumConnections

        public int getNumConnections()
        Returns the total number of connections for this profile