public static final class GPUdbBase.Options extends Object
GPUdb constructor
to
override the default options.Constructor and Description |
---|
Options() |
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 |
getConnectionInactivityValidationTimeout()
Gets the period of inactivity (in milliseconds) after
which connection validity would be checked before reusing it.
|
ExecutorService |
getExecutor()
Gets the
executor service used for managing
threads during data encoding and decoding operations. |
int |
getHostManagerPort()
Gets the host manager port number.
|
Map<String,String> |
getHttpHeaders()
Gets the map of additional HTTP headers to send to GPUdb with each
request.
|
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 |
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 |
setConnectionInactivityValidationTimeout(int value)
Sets the period of inactivity (in milliseconds) after
which connection validity would be checked before reusing it.
|
GPUdbBase.Options |
setExecutor(ExecutorService value)
Sets the
executor service used for managing
threads during data encoding and decoding operations. |
GPUdbBase.Options |
setHostManagerPort(int value)
Sets the host manager port number.
|
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 |
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 |
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.
|
public String getPrimaryUrl()
setPrimaryUrl(String)
public String getUsername()
setUsername(String)
public String getPassword()
setPassword(String)
public boolean getUseSnappy()
setUseSnappy(boolean)
public boolean getBypassSslCertCheck()
setBypassSslCertCheck(boolean)
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 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.
Must be given in the form of 'http[s]://X.X.X.X:PORT[/httpd-path]'.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 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 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 ms)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()
Copyright © 2020. All rights reserved.