public final class ClientConfiguration extends Object implements Serializable
TcpIgniteClient
configuration.Constructor and Description |
---|
ClientConfiguration() |
public String[] getAddresses()
public ClientConfiguration setAddresses(String... addrs)
ClientConnectorConfiguration.DFLT_PORT
, ClientConnectorConfiguration.DFLT_PORT_RANGE
.addrs
- Host addresses.public ClientAddressFinder getAddressesFinder()
public ClientConfiguration setAddressesFinder(ClientAddressFinder finder)
finder
- Finds server node addresses.public boolean isTcpNoDelay()
public ClientConfiguration setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- whether Nagle's algorithm is enabled.public int getTimeout()
public ClientConfiguration setTimeout(int timeout)
timeout
- Send/receive timeout in milliseconds.public int getSendBufferSize()
public ClientConfiguration setSendBufferSize(int sndBufSize)
sndBufSize
- Send buffer size.public int getReceiveBufferSize()
public ClientConfiguration setReceiveBufferSize(int rcvBufSize)
rcvBufSize
- Send buffer size.public BinaryConfiguration getBinaryConfiguration()
public ClientConfiguration setBinaryConfiguration(BinaryConfiguration binaryCfg)
binaryCfg
- Configuration for Ignite Binary objects.public SslMode getSslMode()
public ClientConfiguration setSslMode(SslMode sslMode)
sslMode
- SSL mode.public String getSslClientCertificateKeyStorePath()
public ClientConfiguration setSslClientCertificateKeyStorePath(String newVal)
newVal
- Ssl client certificate key store path.public String getSslClientCertificateKeyStorePassword()
public ClientConfiguration setSslClientCertificateKeyStorePassword(String newVal)
newVal
- Ssl client certificate key store password.public String getSslClientCertificateKeyStoreType()
public ClientConfiguration setSslClientCertificateKeyStoreType(String newVal)
newVal
- Ssl client certificate key store type.public String getSslTrustCertificateKeyStorePath()
public ClientConfiguration setSslTrustCertificateKeyStorePath(String newVal)
newVal
- Ssl trust certificate key store path.public String getSslTrustCertificateKeyStorePassword()
public ClientConfiguration setSslTrustCertificateKeyStorePassword(String newVal)
newVal
- Ssl trust certificate key store password.public String getSslTrustCertificateKeyStoreType()
public ClientConfiguration setSslTrustCertificateKeyStoreType(String newVal)
newVal
- Ssl trust certificate key store type.public String getSslKeyAlgorithm()
public ClientConfiguration setSslKeyAlgorithm(String newVal)
newVal
- Ssl key algorithm.public boolean isSslTrustAll()
public ClientConfiguration setSslTrustAll(boolean newVal)
newVal
- Flag indicating if certificate validation errors should be ignored.public SslProtocol getSslProtocol()
public ClientConfiguration setSslProtocol(SslProtocol newVal)
newVal
- Ssl protocol.public String getUserName()
public ClientConfiguration setUserName(String newVal)
newVal
- User name.public String getUserPassword()
public ClientConfiguration setUserPassword(String newVal)
newVal
- User password.public javax.cache.configuration.Factory<SSLContext> getSslContextFactory()
public ClientConfiguration setSslContextFactory(javax.cache.configuration.Factory<SSLContext> newVal)
newVal
- SSL Context Factory.public ClientTransactionConfiguration getTransactionConfiguration()
public ClientConfiguration setTransactionConfiguration(ClientTransactionConfiguration txCfg)
this
for chaining.public boolean isAffinityAwarenessEnabled()
Default is true
: client sends requests directly to the primary node for the given cache key.
To do so, connection is established to every known server node.
When false
, only one connection is established at a given moment to a random server node.
public ClientConfiguration setAffinityAwarenessEnabled(boolean affinityAwarenessEnabled)
Default is true
: client sends requests directly to the primary node for the given cache key.
To do so, connection is established to every known server node.
When false
, only one connection is established at a given moment to a random server node.
this
for chaining.public boolean isClusterDiscoveryEnabled()
Default is true
: client get addresses of server nodes from the cluster and connects to all of them.
When false
, client only connects to the addresses provided in setAddresses(String...)
and
setAddressesFinder(ClientAddressFinder)
.
public ClientConfiguration setClusterDiscoveryEnabled(boolean clusterDiscoveryEnabled)
Default is true
: client get addresses of server nodes from the cluster and connects to all of them.
When false
, client only connects to the addresses provided in setAddresses(String...)
and
setAddressesFinder(ClientAddressFinder)
.
public long getReconnectThrottlingPeriod()
public ClientConfiguration setReconnectThrottlingPeriod(long reconnectThrottlingPeriod)
this
for chaining.public int getReconnectThrottlingRetries()
public ClientConfiguration setReconnectThrottlingRetries(int reconnectThrottlingRetries)
this
for chaining.public int getRetryLimit()
public ClientConfiguration setRetryLimit(int retryLimit)
this
for chaining.public ClientRetryPolicy getRetryPolicy()
public ClientConfiguration setRetryPolicy(ClientRetryPolicy retryPolicy)
retryLimit
is set, retry count will be limited even if the specified policy returns true
.
Default is ClientRetryAllPolicy
.retryPolicy
- Retry policy.this
for chaining.public Map<String,String> getUserAttributes()
public ClientConfiguration setUserAttributes(Map<String,String> userAttrs)
GridRestRequest
or
ClientListenerAbstractConnectionContext
(depends on client type).userAttrs
- User attributes.this
for chaining.public Executor getAsyncContinuationExecutor()
null
(default), ForkJoinPool.commonPool()
is used.
When async client operation completes, corresponding IgniteFuture
listeners
will be invoked using this executor. Thin client operation results are handled by a dedicated thread.
This thread should be free from any extra work, and should not be not be used to execute future listeners
directly.public ClientConfiguration setAsyncContinuationExecutor(Executor asyncContinuationExecutor)
null
(default), ForkJoinPool.commonPool()
is used.
When async client operation completes, corresponding IgniteFuture
listeners
will be invoked using this executor. Thin client operation results are handled by a dedicated thread.
This thread should be free from any extra work, and should not be not be used to execute future listeners
directly.asyncContinuationExecutor
- Executor for async continuations.this
for chaining.public boolean isHeartbeatEnabled()
heartbeatInterval
.public ClientConfiguration setHeartbeatEnabled(boolean heartbeatEnabled)
heartbeatInterval
.heartbeatEnabled
- Whether to enable heartbeats.this
for chaining.public long getHeartbeatInterval()
30_000
.
When server-side ClientConnectorConfiguration.getIdleTimeout()
is not zero, effective heartbeat
interval is set to min(heartbeatInterval, idleTimeout / 3)
.
When thin client connection is idle (no operations are performed), heartbeat messages are sent periodically
to keep the connection alive and detect potential half-open state. *public ClientConfiguration setHeartbeatInterval(long heartbeatInterval)
30_000
.
When server-side ClientConnectorConfiguration.getIdleTimeout()
is not zero, effective heartbeat
interval is set to min(heartbeatInterval, idleTimeout / 3)
.
When thin client connection is idle (no operations are performed), heartbeat messages are sent periodically
to keep the connection alive and detect potential half-open state. *heartbeatInterval
- Heartbeat interval, in milliseconds.this
for chaining.public boolean isAutoBinaryConfigurationEnabled()
BinaryConfiguration.isCompactFooter()
)
and name mapper (BinaryConfiguration.getNameMapper()
) settings will be retrieved from the server
to match the cluster configuration.
Default is true
.public ClientConfiguration setAutoBinaryConfigurationEnabled(boolean autoBinaryConfigurationEnabled)
BinaryConfiguration.isCompactFooter()
)
and name mapper (BinaryConfiguration.getNameMapper()
) settings will be retrieved from the server
to match the cluster configuration.
Default is true
.autoBinaryConfigurationEnabled
- Whether automatic binary configuration is enabled.this
for chaining.public ClientConfiguration setLogger(IgniteLogger logger)
logger
- Logger.this
for chaining.public IgniteLogger getLogger()
public ClientConfiguration setEventListeners(EventListener... listeners)
listeners
- Clent event listeners.this
for chaining.public EventListener[] getEventListeners()
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024