Package io.pravega.client
Class ClientConfig
- java.lang.Object
-
- io.pravega.client.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientConfig.ClientConfigBuilder
This class overrides the lombok builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientConfig.ClientConfigBuilder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.net.URI
getControllerURI()
controllerURI The controller rpc URI.io.pravega.shared.security.auth.Credentials
getCredentials()
Credentials to be passed on to the Pravega controller for authentication and authorization.int
getMaxConnectionsPerSegmentStore()
Maximum number of connections per Segment store to be used by connection pooling.io.pravega.shared.metrics.MetricListener
getMetricListener()
An optional listener which can be used to get performance metrics from the client.java.lang.String
getTrustStore()
Path to an optional truststore.int
hashCode()
boolean
isEnableTls()
Returns whether TLS is enabled for client-to-server (Controller and Segment Store) communications.boolean
isEnableTlsToController()
boolean
isEnableTlsToSegmentStore()
boolean
isValidateHostName()
If the flagisEnableTls()
is set, this flag decides whether to enable host name validation or not.ClientConfig.ClientConfigBuilder
toBuilder()
java.lang.String
toString()
-
-
-
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 returnsfalse
-
isEnableTlsToController
public boolean isEnableTlsToController()
-
isEnableTlsToSegmentStore
public boolean isEnableTlsToSegmentStore()
-
builder
public static ClientConfig.ClientConfigBuilder builder()
-
toBuilder
public ClientConfig.ClientConfigBuilder toBuilder()
-
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 flagisEnableTls()
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.
-
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 classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-