public class ExecuteOptions extends Object
| Constructor and Description |
|---|
ExecuteOptions() |
| Modifier and Type | Method and Description |
|---|---|
Consistency |
getConsistency()
Gets the last set execution consistency.
|
Durability |
getDurability()
Gets the last set execution durability.
|
MathContext |
getMathContext()
|
int |
getMaxConcurrentRequests()
Returns the maximum number of concurrent requests.
|
int |
getResultsBatchSize()
Returns the number of results per request.
|
long |
getTimeout()
Gets the timeout, which is an upper bound on the time interval for
processing the read or write operations.
|
TimeUnit |
getTimeoutUnit()
Gets the unit of the timeout parameter, and may
be
null only if getTimeout() returns zero. |
ExecuteOptions |
setConsistency(Consistency consistency)
Sets the execution consistency.
|
ExecuteOptions |
setDurability(Durability durability)
Sets the execution durability.
|
ExecuteOptions |
setMathContext(MathContext mathContext)
|
ExecuteOptions |
setMaxConcurrentRequests(int maxConcurrentRequests)
Sets the maximum number of concurrent requests.
|
ExecuteOptions |
setResultsBatchSize(int resultsBatchSize)
Sets the number of results per request.
|
ExecuteOptions |
setTimeout(long timeout,
TimeUnit timeoutUnit)
The
timeout parameter is an upper bound on the time interval for
processing the operation. |
public ExecuteOptions setConsistency(Consistency consistency)
public Consistency getConsistency()
public ExecuteOptions setDurability(Durability durability)
public Durability getDurability()
public ExecuteOptions setTimeout(long timeout, TimeUnit timeoutUnit)
timeout parameter is an upper bound on the time interval for
processing the operation. A best effort is made not to exceed the
specified limit. If zero, the default request timeout is used.
If timeout is not 0, the timeoutUnit parameter must not
be null.
timeout - the timeout value to usetimeoutUnit - the TimeUnit used by the
timeout parameter or nullpublic long getTimeout()
default request timeout is used.public TimeUnit getTimeoutUnit()
null only if getTimeout() returns zero.public int getMaxConcurrentRequests()
public ExecuteOptions setMaxConcurrentRequests(int maxConcurrentRequests)
public int getResultsBatchSize()
public ExecuteOptions setResultsBatchSize(int resultsBatchSize)
public MathContext getMathContext()
MathContext used for BigDecimal and
BigInteger operations. MathContext.DECIMAL32 is used by
default.public ExecuteOptions setMathContext(MathContext mathContext)
MathContext used for BigDecimal and
BigInteger operations. MathContext.DECIMAL32 is used by
default.Copyright (c) 2011, 2017 Oracle and/or its affiliates. All rights reserved.