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.
|
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.
|
String |
getPassword()
Gets the password to be used for authentication to GPUdb.
|
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 |
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 |
setPassword(String value)
Sets the password to be used for authentication to GPUdb.
|
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 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 getTimeout()
setTimeout(int)
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()
Copyright © 2019. All rights reserved.