Package io.pravega.client
Class ClientConfig.ClientConfigBuilder
- java.lang.Object
- 
- io.pravega.client.ClientConfig.ClientConfigBuilder
 
- 
- Enclosing class:
- ClientConfig
 
 public static final class ClientConfig.ClientConfigBuilder extends java.lang.ObjectThis class overrides the lombok builder. It adds some custom functionality on top of the builder. The additional behaviors include: 1. Defining a default controller URI when none is declared/ 2. Extracting the credentials object from system properties/environment in following order of descending preference: a. User provides a credential object. This overrides any other settings. b. System properties: System properties are defined in the format: "pravega.client.auth.*" c. Environment variables. Environment variables are defined under the format "pravega_client_auth_*" d. In case of option 2 and 3, the caller can decide whether the class needs to be loaded dynamically by setting property `pravega.client.auth.loadDynamic` to true.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientConfigbuild()ClientConfig.ClientConfigBuildercontrollerURI(java.net.URI controllerURI)controllerURI The controller rpc URI.ClientConfig.ClientConfigBuildercredentials(io.pravega.shared.security.auth.Credentials credentials)Credentials to be passed on to the Pravega controller for authentication and authorization.ClientConfig.ClientConfigBuilderenableTlsToController(boolean value)ClientConfig.ClientConfigBuilderenableTlsToSegmentStore(boolean value)ClientConfig.ClientConfigBuildermaxConnectionsPerSegmentStore(int maxConnectionsPerSegmentStore)Maximum number of connections per Segment store to be used by connection pooling.ClientConfig.ClientConfigBuildermetricListener(io.pravega.shared.metrics.MetricListener metricListener)An optional listener which can be used to get performance metrics from the client.java.lang.StringtoString()ClientConfig.ClientConfigBuildertrustStore(java.lang.String trustStore)Path to an optional truststore.ClientConfig.ClientConfigBuildervalidateHostName(boolean validateHostName)If the flagClientConfig.isEnableTls()is set, this flag decides whether to enable host name validation or not.
 
- 
- 
- 
Method Detail- 
enableTlsToControllerpublic ClientConfig.ClientConfigBuilder enableTlsToController(boolean value) 
 - 
enableTlsToSegmentStorepublic ClientConfig.ClientConfigBuilder enableTlsToSegmentStore(boolean value) 
 - 
buildpublic ClientConfig build() 
 - 
controllerURIpublic ClientConfig.ClientConfigBuilder controllerURI(java.net.URI controllerURI) 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.- Parameters:
- controllerURI- The controller RPC URI.
- Returns:
- this.
 
 - 
credentialspublic ClientConfig.ClientConfigBuilder credentials(io.pravega.shared.security.auth.Credentials credentials) Credentials to be passed on to the Pravega controller for authentication and authorization.- Parameters:
- credentials- Pravega controller credentials for authentication and authorization.
- Returns:
- this.
 
 - 
trustStorepublic ClientConfig.ClientConfigBuilder trustStore(java.lang.String trustStore) 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.- Parameters:
- trustStore- Path to an optional truststore.
- Returns:
- this.
 
 - 
validateHostNamepublic ClientConfig.ClientConfigBuilder validateHostName(boolean validateHostName) If the flagClientConfig.isEnableTls()is set, this flag decides whether to enable host name validation or not.- Parameters:
- validateHostName- Flag to decide whether to enable host name validation or not.
- Returns:
- this.
 
 - 
maxConnectionsPerSegmentStorepublic ClientConfig.ClientConfigBuilder maxConnectionsPerSegmentStore(int maxConnectionsPerSegmentStore) Maximum number of connections per Segment store to be used by connection pooling.- Parameters:
- maxConnectionsPerSegmentStore- Maximum number of connections per Segment Store for connection pooling.
- Returns:
- this.
 
 - 
metricListenerpublic ClientConfig.ClientConfigBuilder metricListener(io.pravega.shared.metrics.MetricListener metricListener) 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.- Parameters:
- metricListener- Listener to collect client performance metrics.
- Returns:
- this.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-