Package org.apache.ignite.configuration
Class ClientConnectorConfiguration
- java.lang.Object
- 
- org.apache.ignite.configuration.ClientConnectorConfiguration
 
- 
 public class ClientConnectorConfiguration extends Object Client connector configuration.
- 
- 
Field SummaryFields Modifier and Type Field Description static intDFLT_HANDSHAKE_TIMEOUTDefault handshake timeout.static intDFLT_IDLE_TIMEOUTDefault idle timeout.static intDFLT_MAX_OPEN_CURSORS_PER_CONNDefault max number of open cursors per connection.static intDFLT_PORTDefault port.static intDFLT_PORT_RANGEDefault port range.static intDFLT_SELECTOR_CNTDefault selector count.static intDFLT_SESSIONS_MESSAGE_QUEUE_LIMITDefault session outbound queue limit.static intDFLT_SOCK_BUF_SIZEDefault socket send and receive buffer size.static booleanDFLT_TCP_NO_DELAYDefault value forTCP_NODELAYsocket option (value is true).static intDFLT_THREAD_POOL_SIZEDefault size of thread pool.static booleanDFLT_USE_IGNITE_SSL_CTX_FACTORYDefault value of whether to use Ignite SSL context factory.
 - 
Constructor SummaryConstructors Constructor Description ClientConnectorConfiguration()Creates SQL connector configuration with all default values.ClientConnectorConfiguration(ClientConnectorConfiguration cfg)Creates SQL connector configuration by copying all properties from given configuration.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetHandshakeTimeout()Gets handshake timeout for client connections.@Nullable StringgetHost()Get host.longgetIdleTimeout()Gets idle timeout for client connections.intgetMaxOpenCursorsPerConnection()Gets maximum number of opened cursors per connection.intgetPort()Get port.intgetPortRange()Get port range.intgetSelectorCount()Get count of selectors to use in TCP server.intgetSessionOutboundMessageQueueLimit()intgetSocketReceiveBufferSize()Gets socket receive buffer size.intgetSocketSendBufferSize()Gets socket send buffer size.javax.cache.configuration.Factory<SSLContext>getSslContextFactory()Returns SSL context factory that will be used for creating a secure socket layer.ThinClientConfigurationgetThinClientConfiguration()intgetThreadPoolSize()Size of thread pool that is in charge of processing client requests.booleanisJdbcEnabled()Gets whether access through JDBC is enabled.booleanisOdbcEnabled()Gets whether access through ODBC is enabled.booleanisSslClientAuth()Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which validity will be verified with trust manager.booleanisSslEnabled()Whether secure socket layer should be enabled on client connector.booleanisTcpNoDelay()Get TCP NO_DELAY flag.booleanisThinClientEnabled()Gets whether access through thin client is enabled.booleanisUseIgniteSslContextFactory()Gets whether to use Ignite SSL context factory configured throughIgniteConfiguration.getSslContextFactory()ifgetSslContextFactory()is not set.ClientConnectorConfigurationsetHandshakeTimeout(long handshakeTimeout)Sets handshake timeout for client connections.ClientConnectorConfigurationsetHost(@Nullable String host)Set host.ClientConnectorConfigurationsetIdleTimeout(long idleTimeout)Sets idle timeout for client connections.ClientConnectorConfigurationsetJdbcEnabled(boolean jdbcEnabled)Sets whether access through JDBC is enabled.ClientConnectorConfigurationsetMaxOpenCursorsPerConnection(int maxOpenCursorsPerConn)Sets maximum number of opened cursors per connection.ClientConnectorConfigurationsetOdbcEnabled(boolean odbcEnabled)Sets whether access through ODBC is enabled.ClientConnectorConfigurationsetPort(int port)Set port.ClientConnectorConfigurationsetPortRange(int portRange)Set port range.ClientConnectorConfigurationsetSelectorCount(int selectorCnt)Sets count of selectors to use in TCP server.ClientConnectorConfigurationsetSessionOutboundMessageQueueLimit(int sesOutboundMsgQueueLimit)Sets Client session outbound message queue limit.ClientConnectorConfigurationsetSocketReceiveBufferSize(int sockRcvBufSize)Sets socket receive buffer size.ClientConnectorConfigurationsetSocketSendBufferSize(int sockSndBufSize)Sets socket send buffer size.ClientConnectorConfigurationsetSslClientAuth(boolean sslClientAuth)Sets flag indicating whether or not SSL client authentication is required.ClientConnectorConfigurationsetSslContextFactory(javax.cache.configuration.Factory<SSLContext> sslCtxFactory)Sets SSL context factory that will be used for creating a secure socket layer.ClientConnectorConfigurationsetSslEnabled(boolean sslEnabled)Sets whether Secure Socket Layer should be enabled for client connector.ClientConnectorConfigurationsetTcpNoDelay(boolean tcpNoDelay)Set TCP NO_DELAY flag.ClientConnectorConfigurationsetThinClientConfiguration(ThinClientConfiguration thinCliCfg)Sets thin-client specific configuration.ClientConnectorConfigurationsetThinClientEnabled(boolean thinCliEnabled)Sets whether access through thin client is enabled.ClientConnectorConfigurationsetThreadPoolSize(int threadPoolSize)Sets thread pool that is in charge of processing client requests.ClientConnectorConfigurationsetUseIgniteSslContextFactory(boolean useIgniteSslCtxFactory)Sets whether to use Ignite SSL context factory.StringtoString()
 
- 
- 
- 
Field Detail- 
DFLT_PORTpublic static final int DFLT_PORT Default port.- See Also:
- Constant Field Values
 
 - 
DFLT_PORT_RANGEpublic static final int DFLT_PORT_RANGE Default port range.- See Also:
- Constant Field Values
 
 - 
DFLT_SOCK_BUF_SIZEpublic static final int DFLT_SOCK_BUF_SIZE Default socket send and receive buffer size.- See Also:
- Constant Field Values
 
 - 
DFLT_TCP_NO_DELAYpublic static final boolean DFLT_TCP_NO_DELAY Default value forTCP_NODELAYsocket option (value is true).- See Also:
- Constant Field Values
 
 - 
DFLT_MAX_OPEN_CURSORS_PER_CONNpublic static final int DFLT_MAX_OPEN_CURSORS_PER_CONN Default max number of open cursors per connection.- See Also:
- Constant Field Values
 
 - 
DFLT_THREAD_POOL_SIZEpublic static final int DFLT_THREAD_POOL_SIZE Default size of thread pool.
 - 
DFLT_SELECTOR_CNTpublic static final int DFLT_SELECTOR_CNT Default selector count.
 - 
DFLT_HANDSHAKE_TIMEOUTpublic static final int DFLT_HANDSHAKE_TIMEOUT Default handshake timeout.- See Also:
- Constant Field Values
 
 - 
DFLT_IDLE_TIMEOUTpublic static final int DFLT_IDLE_TIMEOUT Default idle timeout.- See Also:
- Constant Field Values
 
 - 
DFLT_USE_IGNITE_SSL_CTX_FACTORYpublic static final boolean DFLT_USE_IGNITE_SSL_CTX_FACTORY Default value of whether to use Ignite SSL context factory.- See Also:
- Constant Field Values
 
 - 
DFLT_SESSIONS_MESSAGE_QUEUE_LIMITpublic static final int DFLT_SESSIONS_MESSAGE_QUEUE_LIMIT Default session outbound queue limit.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ClientConnectorConfigurationpublic ClientConnectorConfiguration() Creates SQL connector configuration with all default values.
 - 
ClientConnectorConfigurationpublic ClientConnectorConfiguration(ClientConnectorConfiguration cfg) Creates SQL connector configuration by copying all properties from given configuration.- Parameters:
- cfg- Configuration to copy.
 
 
- 
 - 
Method Detail- 
getHost@Nullable public @Nullable String getHost() Get host.- Returns:
- Host.
 
 - 
setHostpublic ClientConnectorConfiguration setHost(@Nullable @Nullable String host) Set host.- Parameters:
- host- Host.
- Returns:
- This instance for chaining.
 
 - 
getPortpublic int getPort() Get port.- Returns:
- Port.
 
 - 
setPortpublic ClientConnectorConfiguration setPort(int port) Set port.- Parameters:
- port- Port.
- Returns:
- This instance for chaining.
 
 - 
getPortRangepublic int getPortRange() Get port range.- Returns:
- Port range.
 
 - 
setPortRangepublic ClientConnectorConfiguration setPortRange(int portRange) Set port range.- Parameters:
- portRange- Port range.
- Returns:
- This instance for chaining.
 
 - 
getSocketSendBufferSizepublic int getSocketSendBufferSize() Gets socket send buffer size. When set to zero, operation system default will be used.Defaults to DFLT_SOCK_BUF_SIZE- Returns:
- Socket send buffer size in bytes.
 
 - 
setSocketSendBufferSizepublic ClientConnectorConfiguration setSocketSendBufferSize(int sockSndBufSize) Sets socket send buffer size. SeegetSocketSendBufferSize()for more information.- Parameters:
- sockSndBufSize- Socket send buffer size in bytes.
- Returns:
- This instance for chaining.
 
 - 
getSocketReceiveBufferSizepublic int getSocketReceiveBufferSize() Gets socket receive buffer size. When set to zero, operation system default will be used.Defaults to DFLT_SOCK_BUF_SIZE.- Returns:
- Socket receive buffer size in bytes.
 
 - 
setSocketReceiveBufferSizepublic ClientConnectorConfiguration setSocketReceiveBufferSize(int sockRcvBufSize) Sets socket receive buffer size. SeegetSocketReceiveBufferSize()for more information.- Parameters:
- sockRcvBufSize- Socket receive buffer size in bytes.
- Returns:
- This instance for chaining.
 
 - 
isTcpNoDelaypublic boolean isTcpNoDelay() Get TCP NO_DELAY flag.- Returns:
- TCP NO_DELAY flag.
 
 - 
setTcpNoDelaypublic ClientConnectorConfiguration setTcpNoDelay(boolean tcpNoDelay) Set TCP NO_DELAY flag.- Parameters:
- tcpNoDelay- TCP NO_DELAY flag.
- Returns:
- This instance for chaining.
 
 - 
getMaxOpenCursorsPerConnectionpublic int getMaxOpenCursorsPerConnection() Gets maximum number of opened cursors per connection.Defaults to DFLT_MAX_OPEN_CURSORS_PER_CONN.- Returns:
- Maximum number of opened cursors.
 
 - 
setMaxOpenCursorsPerConnectionpublic ClientConnectorConfiguration setMaxOpenCursorsPerConnection(int maxOpenCursorsPerConn) Sets maximum number of opened cursors per connection.- Parameters:
- maxOpenCursorsPerConn- Maximum number of opened cursors.
- Returns:
- This instance for chaining.
 
 - 
getThreadPoolSizepublic int getThreadPoolSize() Size of thread pool that is in charge of processing client requests.Defaults DFLT_THREAD_POOL_SIZE.- Returns:
- Thread pool that is in charge of processing client requests.
 
 - 
setThreadPoolSizepublic ClientConnectorConfiguration setThreadPoolSize(int threadPoolSize) Sets thread pool that is in charge of processing client requests. SeegetThreadPoolSize()for more information.- Parameters:
- threadPoolSize- Thread pool that is in charge of processing client requests.
- Returns:
- This instance for chaining.
 
 - 
getSelectorCountpublic int getSelectorCount() Get count of selectors to use in TCP server.Defaults DFLT_SELECTOR_CNT.- Returns:
- Count of selectors to use in TCP server.
 
 - 
setSelectorCountpublic ClientConnectorConfiguration setSelectorCount(int selectorCnt) Sets count of selectors to use in TCP server. SeegetSelectorCount()for more information.- Parameters:
- selectorCnt- Count of selectors to use in TCP server.
- Returns:
- This instance for chaining.
 
 - 
getIdleTimeoutpublic long getIdleTimeout() Gets idle timeout for client connections. If no packets come within idle timeout, the connection is closed. Zero or negative means no timeout.- Returns:
- Idle timeout in milliseconds.
 
 - 
setIdleTimeoutpublic ClientConnectorConfiguration setIdleTimeout(long idleTimeout) Sets idle timeout for client connections. If no packets come within idle timeout, the connection is closed. Zero or negative means no timeout.- Parameters:
- idleTimeout- Idle timeout in milliseconds.
- Returns:
- thisfor chaining.
- See Also:
- getIdleTimeout()
 
 - 
getHandshakeTimeoutpublic long getHandshakeTimeout() Gets handshake timeout for client connections. If no successful handshake is performed within this timeout upon successful establishment of TCP connection, the connection is closed. Zero or negative means no timeout.- Returns:
- Handshake timeout in milliseconds.
 
 - 
setHandshakeTimeoutpublic ClientConnectorConfiguration setHandshakeTimeout(long handshakeTimeout) Sets handshake timeout for client connections. If no successful handshake is performed within this timeout upon successful establishment of TCP connection, the connection is closed. Zero or negative means no timeout.- Parameters:
- handshakeTimeout- Idle timeout in milliseconds.
- Returns:
- thisfor chaining.
- See Also:
- getHandshakeTimeout()
 
 - 
isJdbcEnabledpublic boolean isJdbcEnabled() Gets whether access through JDBC is enabled.Defaults to true.- Returns:
- Whether access through JDBC is enabled.
 
 - 
setJdbcEnabledpublic ClientConnectorConfiguration setJdbcEnabled(boolean jdbcEnabled) Sets whether access through JDBC is enabled.Defaults to true.- Parameters:
- jdbcEnabled- Whether access through JDBC is enabled.
- Returns:
- thisfor chaining.
 
 - 
isOdbcEnabledpublic boolean isOdbcEnabled() Gets whether access through ODBC is enabled.Defaults to true.- Returns:
- Whether access through ODBC is enabled.
 
 - 
setOdbcEnabledpublic ClientConnectorConfiguration setOdbcEnabled(boolean odbcEnabled) Sets whether access through ODBC is enabled.Defaults to true.- Parameters:
- odbcEnabled- Whether access through ODBC is enabled.
- Returns:
- thisfor chaining.
 
 - 
isThinClientEnabledpublic boolean isThinClientEnabled() Gets whether access through thin client is enabled.Defaults to true.- Returns:
- Whether access through thin client is enabled.
 
 - 
setThinClientEnabledpublic ClientConnectorConfiguration setThinClientEnabled(boolean thinCliEnabled) Sets whether access through thin client is enabled.Defaults to true.- Parameters:
- thinCliEnabled- Whether access through thin client is enabled.
- Returns:
- thisfor chaining.
 
 - 
isSslEnabledpublic boolean isSslEnabled() Whether secure socket layer should be enabled on client connector.Note that if this flag is set to true, an instance ofFactory<SSLContext>should be provided, otherwise client connector will fail to start.- Returns:
- Trueif SSL should be enabled.
 
 - 
setSslEnabledpublic ClientConnectorConfiguration setSslEnabled(boolean sslEnabled) Sets whether Secure Socket Layer should be enabled for client connector. Note that if this flag is set totrue, then a valid instance ofFactory<SSLContext>should be provided inIgniteConfiguration. Otherwise, TCP binary protocol will fail to start.- Parameters:
- sslEnabled-- Trueif SSL should be enabled.
- Returns:
- thisfor chaining.
 
 - 
isUseIgniteSslContextFactorypublic boolean isUseIgniteSslContextFactory() Gets whether to use Ignite SSL context factory configured throughIgniteConfiguration.getSslContextFactory()ifgetSslContextFactory()is not set.- Returns:
- Trueif Ignite SSL context factory can be used.
 
 - 
setUseIgniteSslContextFactorypublic ClientConnectorConfiguration setUseIgniteSslContextFactory(boolean useIgniteSslCtxFactory) Sets whether to use Ignite SSL context factory. SeeisUseIgniteSslContextFactory()for more information.- Parameters:
- useIgniteSslCtxFactory- Whether to use Ignite SSL context factory
- Returns:
- thisfor chaining.
 
 - 
isSslClientAuthpublic boolean isSslClientAuth() Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which validity will be verified with trust manager.- Returns:
- Whether or not client authentication is required.
 
 - 
setSslClientAuthpublic ClientConnectorConfiguration setSslClientAuth(boolean sslClientAuth) Sets flag indicating whether or not SSL client authentication is required.- Parameters:
- sslClientAuth- Whether or not client authentication is required.
- Returns:
- thisfor chaining.
 
 - 
setSslContextFactorypublic ClientConnectorConfiguration setSslContextFactory(javax.cache.configuration.Factory<SSLContext> sslCtxFactory) Sets SSL context factory that will be used for creating a secure socket layer.- Parameters:
- sslCtxFactory- Ssl context factory.
- Returns:
- thisfor chaining.
- See Also:
- SslContextFactory
 
 - 
getSslContextFactorypublic javax.cache.configuration.Factory<SSLContext> getSslContextFactory() Returns SSL context factory that will be used for creating a secure socket layer.- Returns:
- SSL connection factory.
- See Also:
- SslContextFactory
 
 - 
getThinClientConfigurationpublic ThinClientConfiguration getThinClientConfiguration() - Returns:
- Thin-client specific configuration.
 
 - 
setThinClientConfigurationpublic ClientConnectorConfiguration setThinClientConfiguration(ThinClientConfiguration thinCliCfg) Sets thin-client specific configuration.- Parameters:
- thinCliCfg- Thin-client specific configuration..
- Returns:
- thisfor chaining.
 
 - 
getSessionOutboundMessageQueueLimitpublic int getSessionOutboundMessageQueueLimit() - Returns:
- Session outbound message queue limit.
 
 - 
setSessionOutboundMessageQueueLimitpublic ClientConnectorConfiguration setSessionOutboundMessageQueueLimit(int sesOutboundMsgQueueLimit) Sets Client session outbound message queue limit. Limits the number of messages waiting to be sent from the server side to particular client. If the specified limit is exceeded, corresponding Client connection will be closed. The value0means that no limit is applied to the Client outbound message queue.- Parameters:
- sesOutboundMsgQueueLimit- Session outbound queue limit.
- Returns:
- thisfor chaining.
 
 
- 
 
-