TableIteratorOptionspublic class ReadOptions
extends java.lang.Object
The default behavior is configured when a store is opened using
KVStoreConfig.
| Constructor | Description |
|---|---|
ReadOptions(Consistency consistency,
long timeout,
java.util.concurrent.TimeUnit timeoutUnit) |
Creates a
ReadOptions with the specified parameters. |
| Modifier and Type | Method | Description |
|---|---|---|
Consistency |
getConsistency() |
Gets the consistency used for a read operation.
|
long |
getTimeout() |
Gets the timeout, which is an upper bound on the time interval for
processing the operation.
|
java.util.concurrent.TimeUnit |
getTimeoutUnit() |
Gets the unit of the timeout parameter, and may
be
null only if getTimeout() returns zero. |
public ReadOptions(Consistency consistency, long timeout, java.util.concurrent.TimeUnit timeoutUnit)
ReadOptions with the specified parameters.
If consistency is null, the
default consistency
is used.
If timeout is zero the
default request timeout is used.
The 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.
consistency - the read consistency to use or nulltimeout - the timeout value to usetimeoutUnit - the TimeUnit used by the
timeout parameter or nulljava.lang.IllegalArgumentException - if timeout is negativejava.lang.IllegalArgumentException - if timeout is > 0 and timeoutUnit
is nullpublic Consistency getConsistency()
default consistency
is used.public long getTimeout()
default request timeout is used.public java.util.concurrent.TimeUnit getTimeoutUnit()
null only if getTimeout() returns zero.Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.