Class ClientConfiguration
- java.lang.Object
- 
- org.apache.ignite.configuration.ClientConfiguration
 
- 
- All Implemented Interfaces:
- Serializable
 
 public final class ClientConfiguration extends Object implements Serializable TcpIgniteClientconfiguration.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ClientConfiguration()
 - 
Method Summary
 
- 
- 
- 
Method Detail- 
getAddressespublic String[] getAddresses() - Returns:
- Host addresses.
 
 - 
setAddressespublic ClientConfiguration setAddresses(String... addrs) Set addresses of Ignite server nodes within a cluster. An address can be IPv4 address or hostname, with or without port. If port is not set then Ignite will generate multiple addresses for default port range. SeeClientConnectorConfiguration.DFLT_PORT,ClientConnectorConfiguration.DFLT_PORT_RANGE.- Parameters:
- addrs- Host addresses.
- Returns:
- thisfor chaining.
 
 - 
getAddressesFinderpublic ClientAddressFinder getAddressesFinder() - Returns:
- Finder that finds server node addresses.
 
 - 
setAddressesFinderpublic ClientConfiguration setAddressesFinder(ClientAddressFinder finder) - Parameters:
- finder- Finds server node addresses.
- Returns:
- thisfor chaining.
 
 - 
isTcpNoDelaypublic boolean isTcpNoDelay() - Returns:
- Whether Nagle's algorithm is enabled.
 
 - 
setTcpNoDelaypublic ClientConfiguration setTcpNoDelay(boolean tcpNoDelay) - Parameters:
- tcpNoDelay- whether Nagle's algorithm is enabled.
- Returns:
- thisfor chaining.
 
 - 
getTimeoutpublic int getTimeout() - Returns:
- Send/receive timeout in milliseconds.
 
 - 
setTimeoutpublic ClientConfiguration setTimeout(int timeout) - Parameters:
- timeout- Send/receive timeout in milliseconds.
- Returns:
- thisfor chaining.
 
 - 
getSendBufferSizepublic int getSendBufferSize() - Returns:
- Send buffer size.
 
 - 
setSendBufferSizepublic ClientConfiguration setSendBufferSize(int sndBufSize) - Parameters:
- sndBufSize- Send buffer size.
- Returns:
- thisfor chaining.
 
 - 
getReceiveBufferSizepublic int getReceiveBufferSize() - Returns:
- Send buffer size.
 
 - 
setReceiveBufferSizepublic ClientConfiguration setReceiveBufferSize(int rcvBufSize) - Parameters:
- rcvBufSize- Send buffer size.
- Returns:
- thisfor chaining.
 
 - 
getBinaryConfigurationpublic BinaryConfiguration getBinaryConfiguration() - Returns:
- Configuration for Ignite Binary objects.
 
 - 
setBinaryConfigurationpublic ClientConfiguration setBinaryConfiguration(BinaryConfiguration binaryCfg) - Parameters:
- binaryCfg- Configuration for Ignite Binary objects.
- Returns:
- thisfor chaining.
 
 - 
getSslModepublic SslMode getSslMode() - Returns:
- SSL mode.
 
 - 
setSslModepublic ClientConfiguration setSslMode(SslMode sslMode) - Parameters:
- sslMode- SSL mode.
- Returns:
- thisfor chaining.
 
 - 
getSslClientCertificateKeyStorePathpublic String getSslClientCertificateKeyStorePath() - Returns:
- Ssl client certificate key store path.
 
 - 
setSslClientCertificateKeyStorePathpublic ClientConfiguration setSslClientCertificateKeyStorePath(String newVal) - Parameters:
- newVal- Ssl client certificate key store path.
- Returns:
- thisfor chaining.
 
 - 
getSslClientCertificateKeyStorePasswordpublic String getSslClientCertificateKeyStorePassword() - Returns:
- Ssl client certificate key store password.
 
 - 
setSslClientCertificateKeyStorePasswordpublic ClientConfiguration setSslClientCertificateKeyStorePassword(String newVal) - Parameters:
- newVal- Ssl client certificate key store password.
- Returns:
- thisfor chaining.
 
 - 
getSslClientCertificateKeyStoreTypepublic String getSslClientCertificateKeyStoreType() - Returns:
- Ssl client certificate key store type.
 
 - 
setSslClientCertificateKeyStoreTypepublic ClientConfiguration setSslClientCertificateKeyStoreType(String newVal) - Parameters:
- newVal- Ssl client certificate key store type.
- Returns:
- thisfor chaining.
 
 - 
getSslTrustCertificateKeyStorePathpublic String getSslTrustCertificateKeyStorePath() - Returns:
- Ssl trust certificate key store path.
 
 - 
setSslTrustCertificateKeyStorePathpublic ClientConfiguration setSslTrustCertificateKeyStorePath(String newVal) - Parameters:
- newVal- Ssl trust certificate key store path.
- Returns:
- thisfor chaining.
 
 - 
getSslTrustCertificateKeyStorePasswordpublic String getSslTrustCertificateKeyStorePassword() - Returns:
- Ssl trust certificate key store password.
 
 - 
setSslTrustCertificateKeyStorePasswordpublic ClientConfiguration setSslTrustCertificateKeyStorePassword(String newVal) - Parameters:
- newVal- Ssl trust certificate key store password.
- Returns:
- thisfor chaining.
 
 - 
getSslTrustCertificateKeyStoreTypepublic String getSslTrustCertificateKeyStoreType() - Returns:
- Ssl trust certificate key store type.
 
 - 
setSslTrustCertificateKeyStoreTypepublic ClientConfiguration setSslTrustCertificateKeyStoreType(String newVal) - Parameters:
- newVal- Ssl trust certificate key store type.
- Returns:
- thisfor chaining.
 
 - 
getSslKeyAlgorithmpublic String getSslKeyAlgorithm() - Returns:
- Ssl key algorithm.
 
 - 
setSslKeyAlgorithmpublic ClientConfiguration setSslKeyAlgorithm(String newVal) - Parameters:
- newVal- Ssl key algorithm.
- Returns:
- thisfor chaining.
 
 - 
isSslTrustAllpublic boolean isSslTrustAll() - Returns:
- Flag indicating if certificate validation errors should be ignored.
 
 - 
setSslTrustAllpublic ClientConfiguration setSslTrustAll(boolean newVal) - Parameters:
- newVal- Flag indicating if certificate validation errors should be ignored.
- Returns:
- thisfor chaining.
 
 - 
getSslProtocolpublic SslProtocol getSslProtocol() - Returns:
- Ssl protocol.
 
 - 
setSslProtocolpublic ClientConfiguration setSslProtocol(SslProtocol newVal) - Parameters:
- newVal- Ssl protocol.
- Returns:
- thisfor chaining.
 
 - 
getUserNamepublic String getUserName() - Returns:
- User name.
 
 - 
setUserNamepublic ClientConfiguration setUserName(String newVal) - Parameters:
- newVal- User name.
- Returns:
- thisfor chaining.
 
 - 
getUserPasswordpublic String getUserPassword() - Returns:
- User password.
 
 - 
setUserPasswordpublic ClientConfiguration setUserPassword(String newVal) - Parameters:
- newVal- User password.
- Returns:
- thisfor chaining.
 
 - 
getSslContextFactorypublic javax.cache.configuration.Factory<SSLContext> getSslContextFactory() - Returns:
- SSL Context Factory.
 
 - 
setSslContextFactorypublic ClientConfiguration setSslContextFactory(javax.cache.configuration.Factory<SSLContext> newVal) - Parameters:
- newVal- SSL Context Factory.
- Returns:
- thisfor chaining.
 
 - 
getTransactionConfigurationpublic ClientTransactionConfiguration getTransactionConfiguration() Gets transactions configuration.- Returns:
- Transactions configuration.
 
 - 
setTransactionConfigurationpublic ClientConfiguration setTransactionConfiguration(ClientTransactionConfiguration txCfg) Sets transactions configuration.- Parameters:
- txCfg- Transactions configuration.
- Returns:
- thisfor chaining.
 
 - 
isPartitionAwarenessEnabledpublic boolean isPartitionAwarenessEnabled() Default is Whentrue: client sends requests directly to the primary node for the given cache key. To do so, connection is established to every known server node.false, only one connection is established at a given moment to a random server node.Partition awareness functionality helps to avoid an additional network hop in the following scenarios: - 1. Single-key operations API, like put(), get(), etc. However, the functionality has no effect on those
     operations within explicit transactions ClientTransactions.txStart().
- 2. ScanQuery.setPartition(Integer)andIndexQuery.setPartition(Integer)accept a partition number as a parameter with which the query is routed to a particular server node that stores the requested data.
 - Returns:
- A value indicating whether partition awareness should be enabled.
 
- 1. Single-key operations API, like put(), get(), etc. However, the functionality has no effect on those
     operations within explicit transactions 
 - 
setPartitionAwarenessEnabledpublic ClientConfiguration setPartitionAwarenessEnabled(boolean partitionAwarenessEnabled) Sets a value indicating whether partition awareness should be enabled.Default is Whentrue: client sends requests directly to the primary node for the given cache key. To do so, connection is established to every known server node.false, only one connection is established at a given moment to a random server node.Partition awareness functionality helps to avoid an additional network hop in the following scenarios: - 1. Single-key operations API, like put(), get(), etc. However, the functionality has no effect on
     those operations within explicit transactions ClientTransactions.txStart().
- 2. ScanQuery.setPartition(Integer)andIndexQuery.setPartition(Integer)accept a partition number as a parameter with which the query is routed to a particular server node that stores the requested data.
 - Parameters:
- partitionAwarenessEnabled- Value indicating whether partition awareness should be enabled.
- Returns:
- thisfor chaining.
 
- 1. Single-key operations API, like put(), get(), etc. However, the functionality has no effect on
     those operations within explicit transactions 
 - 
isClusterDiscoveryEnabledpublic boolean isClusterDiscoveryEnabled() Gets a value indicating whether cluster discovery should be enabled.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 insetAddresses(String...)andsetAddressesFinder(ClientAddressFinder).- Returns:
- A value indicating whether cluster discovery should be enabled.
 
 - 
setClusterDiscoveryEnabledpublic ClientConfiguration setClusterDiscoveryEnabled(boolean clusterDiscoveryEnabled) Sets a value indicating whether cluster discovery should be enabled.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 insetAddresses(String...)andsetAddressesFinder(ClientAddressFinder).- Parameters:
- clusterDiscoveryEnabled- Value indicating whether cluster discovery should be enabled.
- Returns:
- thisfor chaining.
 
 - 
getReconnectThrottlingPeriodpublic long getReconnectThrottlingPeriod() - Returns:
- reconnect throttling period.
 
 - 
setReconnectThrottlingPeriodpublic ClientConfiguration setReconnectThrottlingPeriod(long reconnectThrottlingPeriod) Sets reconnect throttling period.- Parameters:
- reconnectThrottlingPeriod- Reconnect throttling period.
- Returns:
- thisfor chaining.
 
 - 
getReconnectThrottlingRetriespublic int getReconnectThrottlingRetries() - Returns:
- Reconnect throttling retries.
 
 - 
setReconnectThrottlingRetriespublic ClientConfiguration setReconnectThrottlingRetries(int reconnectThrottlingRetries) Sets reconnect throttling retries.- Parameters:
- reconnectThrottlingRetries- Reconnect throttling retries.
- Returns:
- thisfor chaining.
 
 - 
getRetryLimitpublic int getRetryLimit() - Returns:
- Retry limit.
 
 - 
setRetryLimitpublic ClientConfiguration setRetryLimit(int retryLimit) Sets the retry limit. When a request fails due to a connection error, and multiple server connections are available, Ignite will retry the request on every connection. When this property is greater than zero, Ignite will limit the number of retries.- Parameters:
- retryLimit- Retry limit.
- Returns:
- thisfor chaining.
 
 - 
getRetryPolicypublic ClientRetryPolicy getRetryPolicy() Gets the retry policy.- Returns:
- Retry policy.
 
 - 
setRetryPolicypublic ClientConfiguration setRetryPolicy(ClientRetryPolicy retryPolicy) Sets the retry policy. When a request fails due to a connection error, and multiple server connections are available, Ignite will retry the request if the specified policy allows it. WhenretryLimitis set, retry count will be limited even if the specified policy returnstrue. Default isClientRetryAllPolicy.- Parameters:
- retryPolicy- Retry policy.
- Returns:
- thisfor chaining.
 
 - 
getUserAttributespublic Map<String,String> getUserAttributes() Returns user attributes which can be used on server node.- Returns:
- User attributes.
 
 - 
setUserAttributespublic ClientConfiguration setUserAttributes(Map<String,String> userAttrs) Sets user attributes which can be used to send additional info to the server nodes. Sent attributes can be accessed on server nodes fromGridRestRequestorClientListenerAbstractConnectionContext(depends on client type).- Parameters:
- userAttrs- User attributes.
- Returns:
- thisfor chaining.
 
 - 
getAsyncContinuationExecutorpublic Executor getAsyncContinuationExecutor() Gets the async continuation executor. Whennull(default),ForkJoinPool.commonPool()is used. When async client operation completes, correspondingIgniteFuturelisteners 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.- Returns:
- Executor for async continuations.
 
 - 
setAsyncContinuationExecutorpublic ClientConfiguration setAsyncContinuationExecutor(Executor asyncContinuationExecutor) Sets the async continuation executor. Whennull(default),ForkJoinPool.commonPool()is used. When async client operation completes, correspondingIgniteFuturelisteners 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.- Parameters:
- asyncContinuationExecutor- Executor for async continuations.
- Returns:
- thisfor chaining.
 
 - 
isHeartbeatEnabledpublic boolean isHeartbeatEnabled() Gets a value indicating whether heartbeats are enabled. 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. See alsoheartbeatInterval.- Returns:
- Whether heartbeats are enabled.
 
 - 
setHeartbeatEnabledpublic ClientConfiguration setHeartbeatEnabled(boolean heartbeatEnabled) Sets a value indicating whether heartbeats are enabled. 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. See alsoheartbeatInterval.- Parameters:
- heartbeatEnabled- Whether to enable heartbeats.
- Returns:
- thisfor chaining.
 
 - 
getHeartbeatIntervalpublic long getHeartbeatInterval() Gets the heartbeat message interval, in milliseconds. Default is30_000. When server-sideClientConnectorConfiguration.getIdleTimeout()is not zero, effective heartbeat interval is set tomin(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. *- Returns:
- Heartbeat interval.
 
 - 
setHeartbeatIntervalpublic ClientConfiguration setHeartbeatInterval(long heartbeatInterval) Sets the heartbeat message interval, in milliseconds. Default is30_000. When server-sideClientConnectorConfiguration.getIdleTimeout()is not zero, effective heartbeat interval is set tomin(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. *- Parameters:
- heartbeatInterval- Heartbeat interval, in milliseconds.
- Returns:
- thisfor chaining.
 
 - 
isAutoBinaryConfigurationEnabledpublic boolean isAutoBinaryConfigurationEnabled() Gets a value indicating whether automatic binary configuration retrieval should be enabled. When enabled, compact footer (BinaryConfiguration.isCompactFooter()) and name mapper (BinaryConfiguration.getNameMapper()) settings will be retrieved from the server to match the cluster configuration. Default istrue.- Returns:
- Whether automatic binary configuration is enabled.
 
 - 
setAutoBinaryConfigurationEnabledpublic ClientConfiguration setAutoBinaryConfigurationEnabled(boolean autoBinaryConfigurationEnabled) Sets a value indicating whether automatic binary configuration retrieval should be enabled. When enabled, compact footer (BinaryConfiguration.isCompactFooter()) and name mapper (BinaryConfiguration.getNameMapper()) settings will be retrieved from the server to match the cluster configuration. Default istrue.- Parameters:
- autoBinaryConfigurationEnabled- Whether automatic binary configuration is enabled.
- Returns:
- thisfor chaining.
 
 - 
setPartitionAwarenessMapperFactorypublic ClientConfiguration setPartitionAwarenessMapperFactory(ClientPartitionAwarenessMapperFactory factory) - Parameters:
- factory- Factory that accepts as parameters a cache name and the number of cache partitions received from a server node and produces key to partition mapping functions.
- Returns:
- thisfor chaining.
 
 - 
getPartitionAwarenessMapperFactorypublic ClientPartitionAwarenessMapperFactory getPartitionAwarenessMapperFactory() - Returns:
- Factory that accepts as parameters a cache name and the number of cache partitions received from a server node and produces key to partition mapping functions.
 
 - 
setLoggerpublic ClientConfiguration setLogger(IgniteLogger logger) Sets the logger.- Parameters:
- logger- Logger.
- Returns:
- thisfor chaining.
 
 - 
getLoggerpublic IgniteLogger getLogger() Gets the logger.- Returns:
- Logger.
 
 - 
setEventListenerspublic ClientConfiguration setEventListeners(EventListener... listeners) - Parameters:
- listeners- Clent event listeners.
- Returns:
- thisfor chaining.
 
 - 
getEventListenerspublic EventListener[] getEventListeners() - Returns:
- Client event listeners.
 
 
- 
 
-