Class Client2CallOptions
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.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclientTimeout
(long timeout, TimeUnit unit) Sets the client-side timeout for a procedure call.queryTimeout
(long timeout, TimeUnit unit) Sets the server-side query timeout for a read-only procedure call or batch of procedure calls.requestPriority
(int prio) Sets the request priority for a procedure call.
-
Constructor Details
-
Client2CallOptions
public Client2CallOptions()The constructor. All options are initialized to their configured or default values, as appropriate.
-
-
Method Details
-
clientTimeout
Sets the client-side timeout for a procedure call. A zero or negative value means there is no limit.If a call has received no response from VoltDB in the specified time, it will be completed with a timeout error.
- Parameters:
timeout
- the timeout intervalunit
- the units in which the timeout was expressed- Returns:
- this
-
queryTimeout
Sets the server-side query timeout for a read-only procedure call or batch of procedure calls. This has no effect on read-write transactions. A zero or negative value means there is no limit.This timeout may override the value specified for
querytimeout
in thesystemsettings
element of the VoltDB cluster configuration file. Admin privilege is required to set a timeout longer than the global value.- Parameters:
timeout
- the timeout intervalunit
- the units in which the timeout was expressed- Returns:
- this
-
requestPriority
Sets the request priority for a procedure call.The valid priority range is from
Client2Config.HIGHEST_PRIORITY
toClient2Config.LOWEST_PRIORITY
, inclusive. Higher priorities have lower numerical values.- Parameters:
prio
- priority- Returns:
- this
-