Class WriteRequest

Direct Known Subclasses:
DeleteRequest, PutRequest

public abstract class WriteRequest extends DurableRequest
Represents a base class for the single row modifying operations NoSQLHandle.put(PutRequest) and NoSQLHandle.delete(DeleteRequest).
  • Method Details

    • getLastWriteMetadata

      public String getLastWriteMetadata()
      Returns the last write metadata to be used for this request.
      Overrides:
      getLastWriteMetadata in class Request
      Returns:
      the last write metadata, or null if not set
      Since:
      5.4.20
    • setLastWriteMetadata

      public WriteRequest setLastWriteMetadata(String lastWriteMetadata)
      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