public class WriteOptions extends Object
The default behavior is configured when a store is opened using
KVStoreConfig.
| Constructor and Description |
|---|
WriteOptions(Durability durability,
long timeout,
TimeUnit timeoutUnit)
Creates a
WriteOptions with the specified parameters. |
| Modifier and Type | Method and Description |
|---|---|
Durability |
getDurability()
Gets the durability associated with the operation.
|
long |
getTimeout()
Gets the timeout, which is an upper bound on the time interval for
processing the operation.
|
TimeUnit |
getTimeoutUnit()
Gets the unit of the timeout parameter, and may
be null only if
getTimeout() returns zero. |
public WriteOptions(Durability durability, long timeout, TimeUnit timeoutUnit)
WriteOptions with the specified parameters.
If durability is null, the
default durability 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.
durability - the write durability to usetimeout - the timeout value to usetimeoutUnit - the TimeUnit used by the
timeout parameterIllegalArgumentException - if timeout is negativeIllegalArgumentException - if timeout is > 0 and timeoutUnit
is nullpublic Durability getDurability()
default durability is
used.public long getTimeout()
default request timeout is used.public TimeUnit getTimeoutUnit()
getTimeout() returns zero.TimeUnit or nullCopyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.