Class ReplaceRequest

All Implemented Interfaces:
CouchbaseMessage, CouchbaseRequest, BinaryRequest, BinaryStoreRequest

public class ReplaceRequest
extends AbstractKeyValueRequest
implements BinaryStoreRequest
  • Constructor Details

    • ReplaceRequest

      public ReplaceRequest​(String key, ByteBuf content, String bucket)
      Creates a new ReplaceRequest.
      Parameters:
      key - the key of the document.
      content - the content of the document.
      bucket - the name of the bucket.
    • ReplaceRequest

      public ReplaceRequest​(String key, ByteBuf content, String bucket, boolean json)
    • ReplaceRequest

      public ReplaceRequest​(String key, ByteBuf content, long cas, String bucket)
      Creates a new ReplaceRequest.
      Parameters:
      key - the key of the document.
      content - the content of the document.
      cas - the cas value.
      bucket - the name of the bucket.
    • ReplaceRequest

      public ReplaceRequest​(String key, ByteBuf content, long cas, String bucket, boolean json)
    • ReplaceRequest

      public ReplaceRequest​(String key, ByteBuf content, long cas, int exp, int flags, String bucket)
      Creates a new ReplaceRequest.
      Parameters:
      key - the key of the document.
      content - the content of the document.
      cas - the cas value.
      exp - the expiration time.
      flags - optional flags.
      bucket - the the name of the bucket.
    • ReplaceRequest

      public ReplaceRequest​(String key, ByteBuf content, long cas, int exp, int flags, String bucket, boolean json)
  • Method Details

    • expiration

      public int expiration()
      Returns the expiration time for this document.
      Specified by:
      expiration in interface BinaryStoreRequest
      Returns:
      the expiration time.
    • flags

      public int flags()
      Returns the flags for this document.
      Specified by:
      flags in interface BinaryStoreRequest
      Returns:
      the flags.
    • content

      public ByteBuf content()
      The content of the document.
      Specified by:
      content in interface BinaryStoreRequest
      Returns:
      the content.
    • cas

      public long cas()
      The CAS value of the request.
      Returns:
      the cas value.
    • isJson

      public boolean isJson()
      Specified by:
      isJson in interface BinaryStoreRequest