public class ClientConnectorConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DFLT_HANDSHAKE_TIMEOUT
Default handshake timeout.
|
static int |
DFLT_IDLE_TIMEOUT
Default idle timeout.
|
static int |
DFLT_MAX_OPEN_CURSORS_PER_CONN
Default max number of open cursors per connection.
|
static int |
DFLT_PORT
Default port.
|
static int |
DFLT_PORT_RANGE
Default port range.
|
static int |
DFLT_SELECTOR_CNT
Default selector count.
|
static int |
DFLT_SOCK_BUF_SIZE
Default socket send and receive buffer size.
|
static boolean |
DFLT_TCP_NO_DELAY
Default value for
TCP_NODELAY socket option (value is true). |
static int |
DFLT_THREAD_POOL_SIZE
Default size of thread pool.
|
static boolean |
DFLT_USE_IGNITE_SSL_CTX_FACTORY
Default value of whether to use Ignite SSL context factory.
|
Constructor and Description |
---|
ClientConnectorConfiguration()
Creates SQL connector configuration with all default values.
|
ClientConnectorConfiguration(ClientConnectorConfiguration cfg)
Creates SQL connector configuration by copying all properties from given configuration.
|
Modifier and Type | Method and Description |
---|---|
long |
getHandshakeTimeout()
Gets handshake timeout for client connections.
|
@Nullable String |
getHost()
Get host.
|
long |
getIdleTimeout()
Gets idle timeout for client connections.
|
int |
getMaxOpenCursorsPerConnection()
Gets maximum number of opened cursors per connection.
|
int |
getPort()
Get port.
|
int |
getPortRange()
Get port range.
|
int |
getSelectorCount()
Get count of selectors to use in TCP server.
|
int |
getSocketReceiveBufferSize()
Gets socket receive buffer size.
|
int |
getSocketSendBufferSize()
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.
|
ThinClientConfiguration |
getThinClientConfiguration()
Gets thin-client specific configuration.
|
int |
getThreadPoolSize()
Size of thread pool that is in charge of processing client requests.
|
boolean |
isJdbcEnabled()
Gets whether access through JDBC is enabled.
|
boolean |
isOdbcEnabled()
Gets whether access through ODBC is enabled.
|
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.
|
boolean |
isSslEnabled()
Whether secure socket layer should be enabled on client connector.
|
boolean |
isTcpNoDelay()
Get TCP NO_DELAY flag.
|
boolean |
isThinClientEnabled()
Gets whether access through thin client is enabled.
|
boolean |
isUseIgniteSslContextFactory()
Gets whether to use Ignite SSL context factory configured through
IgniteConfiguration.getSslContextFactory() if getSslContextFactory() is not set. |
ClientConnectorConfiguration |
setHandshakeTimeout(long handshakeTimeout)
Sets handshake timeout for client connections.
|
ClientConnectorConfiguration |
setHost(@Nullable String host)
Set host.
|
ClientConnectorConfiguration |
setIdleTimeout(long idleTimeout)
Sets idle timeout for client connections.
|
ClientConnectorConfiguration |
setJdbcEnabled(boolean jdbcEnabled)
Sets whether access through JDBC is enabled.
|
ClientConnectorConfiguration |
setMaxOpenCursorsPerConnection(int maxOpenCursorsPerConn)
Sets maximum number of opened cursors per connection.
|
ClientConnectorConfiguration |
setOdbcEnabled(boolean odbcEnabled)
Sets whether access through ODBC is enabled.
|
ClientConnectorConfiguration |
setPort(int port)
Set port.
|
ClientConnectorConfiguration |
setPortRange(int portRange)
Set port range.
|
ClientConnectorConfiguration |
setSelectorCount(int selectorCnt)
Sets count of selectors to use in TCP server.
|
ClientConnectorConfiguration |
setSocketReceiveBufferSize(int sockRcvBufSize)
Sets socket receive buffer size.
|
ClientConnectorConfiguration |
setSocketSendBufferSize(int sockSndBufSize)
Sets socket send buffer size.
|
ClientConnectorConfiguration |
setSslClientAuth(boolean sslClientAuth)
Sets flag indicating whether or not SSL client authentication is required.
|
ClientConnectorConfiguration |
setSslContextFactory(javax.cache.configuration.Factory<SSLContext> sslCtxFactory)
Sets SSL context factory that will be used for creating a secure socket layer.
|
ClientConnectorConfiguration |
setSslEnabled(boolean sslEnabled)
Sets whether Secure Socket Layer should be enabled for client connector.
|
ClientConnectorConfiguration |
setTcpNoDelay(boolean tcpNoDelay)
Set TCP NO_DELAY flag.
|
ClientConnectorConfiguration |
setThinClientConfiguration(ThinClientConfiguration thinCliCfg)
Sets thin-client specific configuration.
|
ClientConnectorConfiguration |
setThinClientEnabled(boolean thinCliEnabled)
Sets whether access through thin client is enabled.
|
ClientConnectorConfiguration |
setThreadPoolSize(int threadPoolSize)
Sets thread pool that is in charge of processing client requests.
|
ClientConnectorConfiguration |
setUseIgniteSslContextFactory(boolean useIgniteSslCtxFactory)
Sets whether to use Ignite SSL context factory.
|
String |
toString() |
public static final int DFLT_PORT
public static final int DFLT_PORT_RANGE
public static final int DFLT_SOCK_BUF_SIZE
public static final boolean DFLT_TCP_NO_DELAY
TCP_NODELAY
socket option (value is true).public static final int DFLT_MAX_OPEN_CURSORS_PER_CONN
public static final int DFLT_THREAD_POOL_SIZE
public static final int DFLT_SELECTOR_CNT
public static final int DFLT_HANDSHAKE_TIMEOUT
public static final int DFLT_IDLE_TIMEOUT
public static final boolean DFLT_USE_IGNITE_SSL_CTX_FACTORY
public ClientConnectorConfiguration()
public ClientConnectorConfiguration(ClientConnectorConfiguration cfg)
cfg
- Configuration to copy.@Nullable public @Nullable String getHost()
public ClientConnectorConfiguration setHost(@Nullable @Nullable String host)
host
- Host.public int getPort()
public ClientConnectorConfiguration setPort(int port)
port
- Port.public int getPortRange()
public ClientConnectorConfiguration setPortRange(int portRange)
portRange
- Port range.public int getSocketSendBufferSize()
Defaults to DFLT_SOCK_BUF_SIZE
public ClientConnectorConfiguration setSocketSendBufferSize(int sockSndBufSize)
getSocketSendBufferSize()
for more information.sockSndBufSize
- Socket send buffer size in bytes.public int getSocketReceiveBufferSize()
Defaults to DFLT_SOCK_BUF_SIZE
.
public ClientConnectorConfiguration setSocketReceiveBufferSize(int sockRcvBufSize)
getSocketReceiveBufferSize()
for more information.sockRcvBufSize
- Socket receive buffer size in bytes.public boolean isTcpNoDelay()
public ClientConnectorConfiguration setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- TCP NO_DELAY flag.public int getMaxOpenCursorsPerConnection()
Defaults to DFLT_MAX_OPEN_CURSORS_PER_CONN
.
public ClientConnectorConfiguration setMaxOpenCursorsPerConnection(int maxOpenCursorsPerConn)
maxOpenCursorsPerConn
- Maximum number of opened cursors.public int getThreadPoolSize()
Defaults DFLT_THREAD_POOL_SIZE
.
public ClientConnectorConfiguration setThreadPoolSize(int threadPoolSize)
getThreadPoolSize()
for more
information.threadPoolSize
- Thread pool that is in charge of processing client requests.public int getSelectorCount()
Defaults DFLT_SELECTOR_CNT
.
public ClientConnectorConfiguration setSelectorCount(int selectorCnt)
getSelectorCount()
for more
information.selectorCnt
- Count of selectors to use in TCP server.public long getIdleTimeout()
public ClientConnectorConfiguration setIdleTimeout(long idleTimeout)
idleTimeout
- Idle timeout in milliseconds.this
for chaining.getIdleTimeout()
public long getHandshakeTimeout()
public ClientConnectorConfiguration setHandshakeTimeout(long handshakeTimeout)
handshakeTimeout
- Idle timeout in milliseconds.this
for chaining.getHandshakeTimeout()
public boolean isJdbcEnabled()
Defaults to true
.
public ClientConnectorConfiguration setJdbcEnabled(boolean jdbcEnabled)
Defaults to true
.
jdbcEnabled
- Whether access through JDBC is enabled.this
for chaining.public boolean isOdbcEnabled()
Defaults to true
.
public ClientConnectorConfiguration setOdbcEnabled(boolean odbcEnabled)
Defaults to true
.
odbcEnabled
- Whether access through ODBC is enabled.this
for chaining.public boolean isThinClientEnabled()
Defaults to true
.
public ClientConnectorConfiguration setThinClientEnabled(boolean thinCliEnabled)
Defaults to true
.
thinCliEnabled
- Whether access through thin client is enabled.this
for chaining.public boolean isSslEnabled()
Note that if this flag is set to true
, an instance of Factory<SSLContext>
should be provided, otherwise client connector will fail to start.
True
if SSL should be enabled.public ClientConnectorConfiguration setSslEnabled(boolean sslEnabled)
true
, then a valid instance of Factory<SSLContext>
should be provided in IgniteConfiguration
. Otherwise, TCP binary protocol will fail to start.sslEnabled
- True
if SSL should be enabled.this
for chaining.public boolean isUseIgniteSslContextFactory()
IgniteConfiguration.getSslContextFactory()
if getSslContextFactory()
is not set.True
if Ignite SSL context factory can be used.public ClientConnectorConfiguration setUseIgniteSslContextFactory(boolean useIgniteSslCtxFactory)
isUseIgniteSslContextFactory()
for more information.useIgniteSslCtxFactory
- Whether to use Ignite SSL context factorythis
for chaining.public boolean isSslClientAuth()
public ClientConnectorConfiguration setSslClientAuth(boolean sslClientAuth)
sslClientAuth
- Whether or not client authentication is required.this
for chaining.public ClientConnectorConfiguration setSslContextFactory(javax.cache.configuration.Factory<SSLContext> sslCtxFactory)
sslCtxFactory
- Ssl context factory.this
for chaining.SslContextFactory
public javax.cache.configuration.Factory<SSLContext> getSslContextFactory()
SslContextFactory
public ThinClientConfiguration getThinClientConfiguration()
public ClientConnectorConfiguration setThinClientConfiguration(ThinClientConfiguration thinCliCfg)
this
for chaining.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024