Package oracle.kv.table
Class WriteOptions
java.lang.Object
oracle.kv.table.WriteOptions
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- BulkWriteOptions
WriteOptions is passed to store operations that can update the store to
 specify non-default behavior relating to durability, timeouts and expiry
 operations.
 
 The default behavior is configured when a store is opened using
 KVStoreConfig.
- Since:
- 3.0
- 
Constructor SummaryConstructorsConstructorDescriptionCreates aWriteOptionswith default values.WriteOptions(Durability durability, long timeout, TimeUnit timeoutUnit) Creates aWriteOptionswith the specified parameters.WriteOptions(WriteOptions options) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected Objectclone()Returns the durability associated with the operation.intGets the number of generated identity values that are requested from the server during a put.longReturns the timeout, which is an upper bound on the time interval for processing the operation.Returns the unit of the timeout parameter.booleanReturns true if the absolute expiration time is to be modified during update operations.setDurability(Durability durability) Sets durability of write operation.setIdentityCacheSize(int identityCacheSize) Sets the number of generated identity values that are requested from the server during a put.setTimeout(long timeout, TimeUnit timeoutUnit) Sets timeout for write operation.setUpdateTTL(boolean flag) Sets whether absolute expiration time will be modified during update.toString()
- 
Constructor Details- 
WriteOptionspublic WriteOptions()Creates aWriteOptionswith default values. Same as WriteOptions(null, 0, null)- Since:
- 4.0
- See Also:
 
- 
WriteOptionsCreates aWriteOptionswith the specified parameters.If durabilityisnull, thedefault durabilityis 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:
- durability- the write durability to use
- timeout- the timeout value to use
- timeoutUnit- the- TimeUnitused by the- timeoutparameter
- Throws:
- IllegalArgumentException- if timeout is negative
- IllegalArgumentException- if timeout is > 0 and timeoutUnit is null
 
- 
WriteOptions
 
- 
- 
Method Details- 
setDurabilitySets durability of write operation.- Parameters:
- durability- can be null. If- null, the- default durabilitywill be used.
- Returns:
- this
- Since:
- 4.0
 
- 
setTimeoutSets timeout for write operation.- Parameters:
- timeout- the timeout value to use
- timeoutUnit- the- TimeUnitused by the- timeoutparameter
- Returns:
- this
- Throws:
- IllegalArgumentException- if timeout is negative
- IllegalArgumentException- if timeout is > 0 and timeoutUnit is null
- Since:
- 4.0
 
- 
getDurabilityReturns the durability associated with the operation.- Returns:
- the durability or null
 
- 
getTimeoutpublic long getTimeout()Returns 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 or zero
 
- 
getTimeoutUnitReturns the unit of the timeout parameter.- Returns:
- the TimeUnitor null if the timeout has not been set.
- Since:
- 4.0
 
- 
setUpdateTTLSets whether absolute expiration time will be modified during update. If false and the operation updates a record, the record's expiration time will not change.
 If the operation inserts a record, this parameter is ignored and the specified TTL is always applied.
 By default, this property is false. To update expiration time of an existing record, this flag must be set to true.- Parameters:
- flag- set to true if the operation should update an existing record's expiration time.
- Returns:
- this
- Since:
- 4.0
 
- 
getUpdateTTLpublic boolean getUpdateTTL()Returns true if the absolute expiration time is to be modified during update operations.- Since:
- 4.0
 
- 
setIdentityCacheSizeSets the number of generated identity values that are requested from the server during a put. This takes precedence to the DDL identity CACHE option. Any value equal of less than 0 means that the DDL identity CACHE value is used.- Since:
- 18.3
 
- 
getIdentityCacheSizepublic int getIdentityCacheSize()Gets the number of generated identity values that are requested from the server during a put.- Since:
- 18.3
 
- 
clone- Overrides:
- clonein class- Object
- Throws:
- CloneNotSupportedException
- Since:
- 4.0
 
- 
toString
 
-