public class ClientNetworkConfig extends Object
| Constructor and Description |
|---|
ClientNetworkConfig() |
| Modifier and Type | Method and Description |
|---|---|
ClientNetworkConfig |
addAddress(String... addresses)
Adds given addresses to candidate address list that client will use to establish initial connection
|
List<String> |
getAddresses()
Returns the list of candidate addresses that client will use to establish initial connection
|
ClientAwsConfig |
getAwsConfig()
Returns the current
ClientAwsConfig. |
int |
getConnectionAttemptLimit() |
int |
getConnectionAttemptPeriod()
Period for the next attempt to find a member to connect.
|
int |
getConnectionTimeout()
Timeout value in millis for nodes to accept client connection requests.
|
DiscoveryConfig |
getDiscoveryConfig()
Returns the configuration of the Hazelcast Discovery SPI and configured discovery providers
|
SocketInterceptorConfig |
getSocketInterceptorConfig() |
SocketOptions |
getSocketOptions() |
SSLConfig |
getSSLConfig()
Returns the current
SSLConfig. |
boolean |
isRedoOperation() |
boolean |
isSmartRouting() |
ClientNetworkConfig |
setAddresses(List<String> addresses)
Adds given addresses to candidate address list that client will use to establish initial connection
|
ClientNetworkConfig |
setAwsConfig(ClientAwsConfig clientAwsConfig)
Sets configuration to connect nodes in aws environment.
|
ClientNetworkConfig |
setConnectionAttemptLimit(int connectionAttemptLimit)
While client is trying to connect initially to one of the members in the
addressList,
all might be not available. |
ClientNetworkConfig |
setConnectionAttemptPeriod(int connectionAttemptPeriod)
Period for the next attempt to find a member to connect.
|
ClientNetworkConfig |
setConnectionTimeout(int connectionTimeout) |
void |
setDiscoveryConfig(DiscoveryConfig discoveryConfig)
Defines the Discovery Provider SPI configuration
|
ClientNetworkConfig |
setRedoOperation(boolean redoOperation)
If true, client will redo the operations that were executing on the server and client lost the connection.
|
ClientNetworkConfig |
setSmartRouting(boolean smartRouting)
If true, client will route the key based operations to owner of the key at the best effort.
|
ClientNetworkConfig |
setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig) |
ClientNetworkConfig |
setSocketOptions(SocketOptions socketOptions) |
ClientNetworkConfig |
setSSLConfig(SSLConfig sslConfig)
Sets the
SSLConfig. |
public DiscoveryConfig getDiscoveryConfig()
public void setDiscoveryConfig(DiscoveryConfig discoveryConfig)
discoveryConfig - the Discovery Provider SPI configurationpublic boolean isSmartRouting()
com.hazelcast.client.config.ClientNetworkConfig#setSmartRouting(boolean)} for detailspublic ClientNetworkConfig setSmartRouting(boolean smartRouting)
PartitionService.getPartitions() and doesn't
guarantee that the operation will always be executed on the owner. The cached table is updated every 10 seconds.
Default value is true.smartRouting - true if smart routing should be enabled.ClientNetworkConfig for chainingpublic SocketInterceptorConfig getSocketInterceptorConfig()
public ClientNetworkConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
socketInterceptorConfig - will be called with the Socket,
each time client creates a connection to any Member.ClientNetworkConfig for chainingpublic int getConnectionAttemptPeriod()
ClientNetworkConfig#connectionAttemptLimit}.public ClientNetworkConfig setConnectionAttemptPeriod(int connectionAttemptPeriod)
connectionAttemptPeriod - time to wait before another attempt in millisClientNetworkConfig for chainingpublic int getConnectionAttemptLimit()
com.hazelcast.client.config.ClientNetworkConfig#setConnectionAttemptLimit(int)} for detailspublic ClientNetworkConfig setConnectionAttemptLimit(int connectionAttemptLimit)
addressList,
all might be not available. Instead of giving up, throwing Exception and stopping client, it will
attempt to retry as much as connectionAttemptLimit times.connectionAttemptLimit - number of times to attempt to connect
A zero value means try forever.ClientNetworkConfig for chainingpublic int getConnectionTimeout()
public ClientNetworkConfig setConnectionTimeout(int connectionTimeout)
connectionTimeout - Timeout value in millis for nodes to accept client connection requests.
A zero value means wait until connection established or an error occurs.ClientNetworkConfig for chainingpublic ClientNetworkConfig addAddress(String... addresses)
addresses - to be added to initial address listClientNetworkConfig for chainingpublic ClientNetworkConfig setAddresses(List<String> addresses)
addresses - to be added to initial address listClientNetworkConfig for chainingpublic List<String> getAddresses()
public boolean isRedoOperation()
com.hazelcast.client.config.ClientNetworkConfig#setRedoOperation(boolean)} for detailspublic ClientNetworkConfig setRedoOperation(boolean redoOperation)
RuntimeException that is wrapping IOException.
TODO clear what is the exception hereredoOperation - true if redo operations are enabledClientNetworkConfig for chainingpublic SocketOptions getSocketOptions()
public ClientNetworkConfig setSocketOptions(SocketOptions socketOptions)
socketOptions - TCP Socket optionsClientNetworkConfig for chainingpublic SSLConfig getSSLConfig()
SSLConfig. It is possible that null is returned if no SSLConfig has been
set.setSSLConfig(SSLConfig)public ClientNetworkConfig setSSLConfig(SSLConfig sslConfig)
SSLConfig. null value indicates that no SSLConfig should be used.sslConfig - the SSLConfig.getSSLConfig()public ClientNetworkConfig setAwsConfig(ClientAwsConfig clientAwsConfig)
clientAwsConfig - the ClientAwsConfiggetAwsConfig()public ClientAwsConfig getAwsConfig()
ClientAwsConfig. It is possible that null is returned if no SSLConfig has beensetAwsConfig(ClientAwsConfig)Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.