Package oracle.kv.table
Class ReadOptions
java.lang.Object
oracle.kv.table.ReadOptions
- Direct Known Subclasses:
- TableIteratorOptions
ReadOptions is passed to read-only store operations to specify arguments that
 control non-default behavior related to consistency and operation timeouts.
 
 The default behavior is configured when a store is opened using
 KVStoreConfig.
- Since:
- 3.0
- 
Constructor SummaryConstructorsConstructorDescriptionReadOptions(Consistency consistency, long timeout, TimeUnit timeoutUnit) Creates aReadOptionswith the specified parameters.
- 
Method SummaryModifier and TypeMethodDescriptionGets the consistency used for a read operation.longGets the timeout, which is an upper bound on the time interval for processing the operation.Gets the unit of the timeout parameter, and may benullonly ifgetTimeout()returns zero.
- 
Constructor Details- 
ReadOptionsCreates aReadOptionswith the specified parameters.If consistencyisnull, thedefault consistencyis used.If timeoutis zero thedefault request timeoutis used.The timeoutparameter 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, thedefault request timeoutis used.If timeoutis not 0, thetimeoutUnitparameter must not benull.- Parameters:
- consistency- the read consistency to use or null
- timeout- the timeout value to use
- timeoutUnit- the- TimeUnitused by the- timeoutparameter or null
- Throws:
- IllegalArgumentException- if timeout is negative
- IllegalArgumentException- if timeout is > 0 and timeoutUnit is null
 
 
- 
- 
Method Details- 
getConsistencyGets the consistency used for a read operation. If null, thedefault consistencyis used.- Returns:
- the consistency used for a read operation
 
- 
getTimeoutpublic long getTimeout()Gets the timeout, which 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, thedefault request timeoutis used.- Returns:
- the timeout
 
- 
getTimeoutUnitGets the unit of the timeout parameter, and may benullonly ifgetTimeout()returns zero.- Returns:
- the timeout unit or null
 
 
-