Class ClientConfig

  • All Implemented Interfaces:
    java.io.Serializable

    @Beta
    public class ClientConfig
    extends java.lang.Object
    implements java.io.Serializable
    This class contains configuration that is passed on to Pravega client. Please note that this is an experimental object and the contents and their interpretation may change in future.
    See Also:
    Serialized Form
    • Method Detail

      • isEnableTls

        public boolean isEnableTls()
        Returns whether TLS is enabled for client-to-server (Controller and Segment Store) communications.
        Returns:
        true if TLS is enabled, otherwise returns false
      • isEnableTlsToController

        public boolean isEnableTlsToController()
      • isEnableTlsToSegmentStore

        public boolean isEnableTlsToSegmentStore()
      • getControllerURI

        public java.net.URI getControllerURI()
        controllerURI The controller rpc URI. This can be of 2 types 1. tcp://ip1:port1,ip2:port2,... This is used if the controller endpoints are static and can be directly accessed. 2. pravega://ip1:port1,ip2:port2,... This is used to autodiscovery the controller endpoints from an initial controller list.
        Returns:
        The controller RPC URI.
      • getCredentials

        public io.pravega.shared.security.auth.Credentials getCredentials()
        Credentials to be passed on to the Pravega controller for authentication and authorization.
        Returns:
        Pravega controller credentials for authentication and authorization.
      • getTrustStore

        public java.lang.String getTrustStore()
        Path to an optional truststore. If this is null or empty, the default JVM trust store is used. This is currently expected to be a signing certificate for the certification authority.
        Returns:
        Path to an optional truststore.
      • isValidateHostName

        public boolean isValidateHostName()
        If the flag isEnableTls() is set, this flag decides whether to enable host name validation or not.
        Returns:
        Flag to decide whether to enable host name validation or not.
      • getMaxConnectionsPerSegmentStore

        public int getMaxConnectionsPerSegmentStore()
        Maximum number of connections per Segment store to be used by connection pooling.
        Returns:
        Maximum number of connections per Segment store to be used by connection pooling.
      • getConnectTimeoutMilliSec

        public long getConnectTimeoutMilliSec()
        Maximum Connection timeout in milliseconds for establishing connections.
        Returns:
        Connection timeout in milliseconds for establishing connections.
      • getMetricListener

        public io.pravega.shared.metrics.MetricListener getMetricListener()
        An optional listener which can be used to get performance metrics from the client. The user can implement this interface to obtain performance metrics of the client.
        Returns:
        Listener to collect client performance metrics.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object