Class WriteRequest
java.lang.Object
oracle.nosql.driver.ops.Request
oracle.nosql.driver.ops.DurableRequest
oracle.nosql.driver.ops.WriteRequest
- Direct Known Subclasses:
DeleteRequest, PutRequest
Represents a base class for the single row modifying operations
NoSQLHandle.put(PutRequest) and NoSQLHandle.delete(DeleteRequest).-
Method Summary
Modifier and TypeMethodDescriptionReturns the last write metadata to be used for this request.setLastWriteMetadata(String lastWriteMetadata) Sets the write metadata to use for this request.Methods inherited from class DurableRequest
getDurabilityMethods inherited from class Request
getCompartment, getNamespace, getRateLimitDelayedMs, getReadRateLimiter, getRetryStats, getTableName, getTypeName, getWriteRateLimiter, setReadRateLimiter, setWriteRateLimiter
-
Method Details
-
getLastWriteMetadata
Returns the last write metadata to be used for this request.- Overrides:
getLastWriteMetadatain classRequest- Returns:
- the last write metadata, or null if not set
- Since:
- 5.4.20
-
setLastWriteMetadata
Sets the write metadata to use for this request. This is an optional parameter.Last write metadata is associated to a certain version of a row. Any subsequent write operation will use its own write metadata value. If not specified null will be used by default. NOTE that if you have previously written a record with metadata and a subsequent write does not supply metadata, the metadata associated with the row will be null. Therefore, if you wish to have metadata associated with every write operation, you must supply a valid JSON construct to this method.
- Parameters:
lastWriteMetadata- the write metadata, must be null or a valid JSON construct: object, array, string, number, true, false or null, otherwise an IllegalArgumentException is thrown.- Returns:
- this
- Throws:
IllegalArgumentException- if lastWriteMetadata not null and invalid JSON construct- Since:
- 5.4.20
-