public static final class GPUdbBase.Options extends Object
GPUdb constructor
to
override the default options.Constructor and Description |
---|
Options()
No-argument constructor needed for the copy constructor.
|
Options(GPUdbBase.Options other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
GPUdbBase.Options |
addHttpHeader(String header,
String value)
Adds an HTTP header to the map of additional HTTP headers to send to
GPUdb with each request.
|
boolean |
getBypassSslCertCheck()
Gets the value of the flag indicating whether to verify the SSL
certificate for HTTPS connections.
|
int |
getClusterReconnectCount()
Deprecated.
Gets the number of times the API tries to reconnect to the
same cluster (when a failover event has been triggered),
before actually failing over to any available backup
cluster.
|
int |
getConnectionInactivityValidationTimeout()
Gets the period of inactivity (in milliseconds) after
which connection validity would be checked before reusing it.
|
boolean |
getDisableAutoDiscovery()
Gets the value of the flag indicating whether to disable automatic
discovery of backup clusters or worker rank URLs.
|
boolean |
getDisableFailover()
Gets the value of the flag indicating whether to disable failover
upon failures.
|
ExecutorService |
getExecutor()
Gets the
executor service used for managing
threads during data encoding and decoding operations. |
GPUdbBase.HAFailoverOrder |
getHAFailoverOrder()
Gets the current high availability failover order.
|
int |
getHostManagerPort()
Gets the host manager port number.
|
Pattern |
getHostnameRegex()
Gets the regex pattern to be used to filter URLs of the servers.
|
Map<String,String> |
getHttpHeaders()
Gets the map of additional HTTP headers to send to GPUdb with each
request.
|
long |
getInitialConnectionAttemptTimeout()
Gets the timeout used when trying to establish a connection to the
database at GPUdb initialization.
|
long |
getIntraClusterFailoverTimeout()
Deprecated.
Gets the timeout used when trying to recover from an intra-cluster
failover event. The value is given in milliseconds. Returns 0.
|
int |
getMaxConnectionsPerHost()
Gets the maximum number of connections, per host, allowed at
any given time.
|
int |
getMaxTotalConnections()
Gets the maximum number of connections, across all hosts, allowed at
any given time.
|
String |
getPassword()
Gets the password to be used for authentication to GPUdb.
|
String |
getPrimaryUrl()
Gets the URL of the primary cluster of the HA environment.
|
int |
getServerConnectionTimeout()
Gets the server connection timeout value, in milliseconds, after
which an inability to establish a connection with the GPUdb server
will result in requests being aborted.
|
int |
getThreadCount()
Gets the number of threads that will be used during data encoding and
decoding operations.
|
int |
getTimeout()
Gets the timeout value, in milliseconds, after which a lack of
response from the GPUdb server will result in requests being aborted.
|
String |
getTrustStoreFilePath()
Gets the value of the SSL trustStore file path
|
String |
getTrustStorePassword()
Gets the SSL trustStore file password
|
String |
getUsername()
Gets the username to be used for authentication to GPUdb.
|
boolean |
getUseSnappy()
Gets the value of the flag indicating whether to use Snappy
compression for certain GPUdb requests that potentially submit large
amounts of data.
|
GPUdbBase.Options |
setBypassSslCertCheck(boolean value)
Sets the flag indicating whether to verify the SSL certificate for
HTTPS connections.
|
GPUdbBase.Options |
setClusterReconnectCount(int value)
Deprecated.
Sets the number of times the API tries to reconnect to the
same cluster (when a failover event has been triggered),
before actually failing over to any available backup
cluster.
|
GPUdbBase.Options |
setConnectionInactivityValidationTimeout(int value)
Sets the period of inactivity (in milliseconds) after
which connection validity would be checked before reusing it.
|
GPUdbBase.Options |
setDisableAutoDiscovery(boolean value)
Sets the value of the flag indicating whether to disable automatic
discovery of backup clusters or worker rank URLs.
|
GPUdbBase.Options |
setDisableFailover(boolean value)
Sets the value of the flag indicating whether to disable failover
upon failures.
|
GPUdbBase.Options |
setExecutor(ExecutorService value)
Sets the
executor service used for managing
threads during data encoding and decoding operations. |
GPUdbBase.Options |
setHAFailoverOrder(GPUdbBase.HAFailoverOrder value)
Sets the value of the enum controlling the inter-cluster (high
availability) failover priority.
|
GPUdbBase.Options |
setHostManagerPort(int value)
Sets the host manager port number.
|
GPUdbBase.Options |
setHostnameRegex(Pattern value)
Sets the IP address or hostname regex against which the server's
rank URLs would be matched when obtaining them.
|
GPUdbBase.Options |
setHostnameRegex(String value)
Sets the IP address or hostname regex against which the server's
rank URLs would be matched when obtaining them.
|
GPUdbBase.Options |
setHttpHeaders(Map<String,String> value)
Replaces the contents of the map of additional HTTP headers to send
to GPUdb with each request with the contents of the specified map.
|
GPUdbBase.Options |
setInitialConnectionAttemptTimeout(long value)
Sets the timeout used when trying to establish a connection to the
database at GPUdb initialization.
|
GPUdbBase.Options |
setIntraClusterFailoverTimeout(long value)
Deprecated.
Sets the timeout used when trying to recover from an intra-cluster
failover event. The value is given in milliseconds.
|
GPUdbBase.Options |
setMaxConnectionsPerHost(int value)
Sets the maximum number of connections, per host, allowed at
any given time.
|
GPUdbBase.Options |
setMaxTotalConnections(int value)
Sets the maximum number of connections, across all hosts, allowed at
any given time.
|
GPUdbBase.Options |
setPassword(String value)
Sets the password to be used for authentication to GPUdb.
|
GPUdbBase.Options |
setPrimaryUrl(String value)
Sets the URL of the primary cluster to use amongst the HA clusters.
|
GPUdbBase.Options |
setServerConnectionTimeout(int value)
Sets the server connection timeout value, in milliseconds, after
which an inability to establish a connection with the GPUdb server
will result in requests being aborted.
|
GPUdbBase.Options |
setThreadCount(int value)
Sets the number of threads that will be used during data encoding and
decoding operations.
|
GPUdbBase.Options |
setTimeout(int value)
Sets the timeout value, in milliseconds, after which a lack of
response from the GPUdb server will result in requests being aborted.
|
GPUdbBase.Options |
setTrustStoreFilePath(String trustStoreFilePath)
Sets the SSL trustStore file path.
|
GPUdbBase.Options |
setTrustStorePassword(String trustStorePassword)
Sets the SSL trustStore file password.
|
GPUdbBase.Options |
setUsername(String value)
Sets the username to be used for authentication to GPUdb.
|
GPUdbBase.Options |
setUseSnappy(boolean value)
Sets the flag indicating whether to use Snappy compression for
certain GPUdb requests that potentially submit large amounts of data.
|
String |
toString()
Returns the set of options as a JSON-style string
|
public Options()
public Options(GPUdbBase.Options other)
public String toString()
public String getPrimaryUrl()
setPrimaryUrl(String)
public String getUsername()
setUsername(String)
public String getPassword()
setPassword(String)
public Pattern getHostnameRegex()
setHostnameRegex(Pattern)
public boolean getUseSnappy()
setUseSnappy(boolean)
public boolean getBypassSslCertCheck()
setBypassSslCertCheck(boolean)
public String getTrustStoreFilePath()
public String getTrustStorePassword()
public boolean getDisableFailover()
setDisableFailover(boolean)
public boolean getDisableAutoDiscovery()
setDisableAutoDiscovery(boolean)
public GPUdbBase.HAFailoverOrder getHAFailoverOrder()
setHAFailoverOrder(GPUdbBase.HAFailoverOrder)
public int getThreadCount()
setThreadCount(int)
,
setExecutor(ExecutorService)
public ExecutorService getExecutor()
executor service
used for managing
threads during data encoding and decoding operations. If
null
, threads will be created on demand; not used if
thread count
equals 1.setExecutor(ExecutorService)
,
setThreadCount(int)
public Map<String,String> getHttpHeaders()
addHttpHeader(String, String)
,
setHttpHeaders(Map)
public int getHostManagerPort()
setHostManagerPort(int)
public int getConnectionInactivityValidationTimeout()
setConnectionInactivityValidationTimeout(int)
public int getTimeout()
setTimeout(int)
,
getServerConnectionTimeout()
public int getServerConnectionTimeout()
getTimeout()
,
setServerConnectionTimeout(int)
public int getMaxTotalConnections()
setMaxTotalConnections(int)
public int getMaxConnectionsPerHost()
setMaxConnectionsPerHost(int)
public int getClusterReconnectCount()
setClusterReconnectCount(int)
public long getInitialConnectionAttemptTimeout()
setInitialConnectionAttemptTimeout(long)
public long getIntraClusterFailoverTimeout()
setIntraClusterFailoverTimeout( long )
public GPUdbBase.Options setPrimaryUrl(String value)
GPUdb
constructors will ensure that no duplicate of this
URL exists in the full set of URLs to use. If this is not set, then
all available clusters will be treated with equal probability (unless
only a single URL is given for the Kinetica server, in which case it
will also be treated as the primary cluster).
Can be given in the form of 'http[s]://X.X.X.X:PORT[/httpd-path]' or
just the IP address or the hostname.value
- the URL of the primary clusterGPUdbBase.Options
instancegetPrimaryUrl()
public GPUdbBase.Options setUsername(String value)
password
and may be used for
authorization decisions by the server if it is so configured. If
both the username and password are null
(the default) or
empty strings, no authentication will be performed.value
- the usernameGPUdbBase.Options
instancegetUsername()
,
setPassword(String)
public GPUdbBase.Options setPassword(String value)
username
and may be used for
authorization decisions by the server if it is so configured. If
both the username and password are null
(the default) or
empty strings, no authentication will be performed.value
- the passwordGPUdbBase.Options
instancegetPassword()
,
setUsername(String)
public GPUdbBase.Options setHostnameRegex(String value) throws GPUdbException
value
- the IP or hostname regex to match URLs againstGPUdbBase.Options
instanceGPUdbException
getHostnameRegex()
public GPUdbBase.Options setHostnameRegex(Pattern value)
value
- the IP or hostname regex to match URLs againstGPUdbBase.Options
instancegetHostnameRegex()
public GPUdbBase.Options setUseSnappy(boolean value)
true
, such requests will be automatically compressed
before being sent to the server; the default is false
.value
- the new value for the Snappy compression flagGPUdbBase.Options
instancegetUseSnappy()
public GPUdbBase.Options setBypassSslCertCheck(boolean value)
true
, then the SSL certificate sent
by the server during HTTPS connection handshake will not be verified;
the public key sent by the server will be blindly trusted and used
to encrypt the packets. The default is false
.value
- the value of the SSL certificate verification bypass
flagGPUdbBase.Options
instancegetBypassSslCertCheck()
public GPUdbBase.Options setTrustStoreFilePath(String trustStoreFilePath)
GPUdbBase.Options m_gpudbOptions = new GPUdbBase.Options(); m_gpudbOptions = m_gpudbOptions.setTrustStoreFilePath(m_trustStoreFileName); m_gpudbOptions = m_gpudbOptions.setTrustStorePassword(m_trustStorePassword);
trustStoreFilePath
- - String indicating the full file pathGPUdbBase.Options
instancesetTrustStorePassword(String)
public GPUdbBase.Options setTrustStorePassword(String trustStorePassword)
GPUdbBase.Options m_gpudbOptions = new GPUdbBase.Options(); m_gpudbOptions = m_gpudbOptions.setTrustStoreFilePath(m_trustStoreFileName); m_gpudbOptions = m_gpudbOptions.setTrustStorePassword(m_trustStorePassword);
trustStorePassword
- - String indicating the full file pathGPUdbBase.Options
instance(String)
public GPUdbBase.Options setDisableFailover(boolean value)
true
, then no failover would be attempted upon triggering
events regardless of the availability of a high availability cluster.
The default is false
.value
- the value of the failover disabling flagGPUdbBase.Options
instancegetDisableFailover()
public GPUdbBase.Options setDisableAutoDiscovery(boolean value)
value
- the value of the automatic discovery disabling flagGPUdbBase.Options
instancegetDisableAutoDiscovery()
public GPUdbBase.Options setHAFailoverOrder(GPUdbBase.HAFailoverOrder value)
value
- the value of the high availability failover priorityGPUdbBase.Options
instancegetHAFailoverOrder()
public GPUdbBase.Options setThreadCount(int value)
executor service
is
provided, it will be used for thread management, and up to this many
operations will be submitted to it at a time for execution. (Note
that if the provided executor service supports fewer than this many
threads, fewer operations will actually be executed simultaneously.)
If no executor service is provided, any required threads will be
created on demand.value
- the number of threadsGPUdbBase.Options
instanceIllegalArgumentException
- if value
is less than onegetThreadCount()
,
setExecutor(ExecutorService)
public GPUdbBase.Options setExecutor(ExecutorService value)
executor service
used for managing
threads during data encoding and decoding operations. If
null
, threads will be created on demand; not used if
thread count
equals 1.
If the provided executor service supports fewer threads than the
thread count
, fewer operations will
actually be executed simultaneously.value
- the executor serviceGPUdbBase.Options
instancegetExecutor()
,
setThreadCount(int)
public GPUdbBase.Options setHttpHeaders(Map<String,String> value)
value
- the mapGPUdbBase.Options
instanceaddHttpHeader(String, String)
,
getHttpHeaders()
public GPUdbBase.Options addHttpHeader(String header, String value)
header
- the HTTP headervalue
- the value of the HTTP headerGPUdbBase.Options
instancegetHttpHeaders()
,
setHttpHeaders(Map)
public GPUdbBase.Options setHostManagerPort(int value)
value
- the host manager port numberGPUdbBase.Options
instancegetHostManagerPort()
public GPUdbBase.Options setTimeout(int value)
value
- the timeout valueGPUdbBase.Options
instancegetTimeout()
public GPUdbBase.Options setServerConnectionTimeout(int value)
value
- the server connection timeout valueGPUdbBase.Options
instancegetServerConnectionTimeout()
public GPUdbBase.Options setConnectionInactivityValidationTimeout(int value)
value
- the connection inactivity timeout (in milliseconds)GPUdbBase.Options
instancegetServerConnectionTimeout()
public GPUdbBase.Options setMaxTotalConnections(int value)
value
- the maxTotalConnections valueGPUdbBase.Options
instancegetMaxTotalConnections()
public GPUdbBase.Options setMaxConnectionsPerHost(int value)
value
- the maxConnectionsPerHost valueGPUdbBase.Options
instancegetMaxConnectionsPerHost()
public GPUdbBase.Options setClusterReconnectCount(int value)
value
- the clusterReconnectCount valueGPUdbBase.Options
instancepublic GPUdbBase.Options setInitialConnectionAttemptTimeout(long value)
value
- the initialConnectionAttemptTimeout valueGPUdbBase.Options
instancegetInitialConnectionAttemptTimeout()
public GPUdbBase.Options setIntraClusterFailoverTimeout(long value)
value
- the intraClusterFailoverTimeout valueGPUdbBase.Options
instancegetIntraClusterFailoverTimeout()
Copyright © 2024. All rights reserved.