public class Client2CallOptions
extends java.lang.Object
Client2
VoltDB
client. A Client2CallOptions
can be used with
callProcedureAsync
or
callProcedureSync
to
pass in override options for specific calls.
Using a single options class helps avoid combinatorial explosion of options.
Options not explicity set will assume the values set up
when the client was configured. VoltDB recommends using
Client2Config
to set values that will remain
unchanged for the life of the client, with this
Client2CallOptions
class being used only
when variance between calls is needed.
Client2
,
Client2Config
Constructor and Description |
---|
Client2CallOptions()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
Client2CallOptions |
clientTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets the client-side timeout for a procedure call.
|
Client2CallOptions |
queryTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets the server-side query timeout for a read-only procedure call
or batch of procedure calls.
|
Client2CallOptions |
requestPriority(int prio)
Sets the request priority for a procedure call.
|
public Client2CallOptions()
public Client2CallOptions clientTimeout(long timeout, java.util.concurrent.TimeUnit unit)
If a call has received no response from VoltDB in the specified time, it will be completed with a timeout error.
timeout
- the timeout intervalunit
- the units in which the timeout was expressedpublic Client2CallOptions queryTimeout(long timeout, java.util.concurrent.TimeUnit unit)
This timeout may override the value specified for querytimeout
in the systemsettings
element of the VoltDB cluster
configuration file. Admin privilege is required to set a timeout
longer than the global value.
timeout
- the timeout intervalunit
- the units in which the timeout was expressedpublic Client2CallOptions requestPriority(int prio)
The valid priority range is from Client2Config.HIGHEST_PRIORITY
to Client2Config.LOWEST_PRIORITY
, inclusive. Higher priorities
have lower numerical values.
prio
- priority