Class ExistsResult

java.lang.Object
com.couchbase.client.java.kv.ExistsResult

public class ExistsResult extends Object
Result returned from an exists KeyValue operation.
Since:
3.0.0
  • Method Details

    • from

      @Internal public static ExistsResult from(CoreExistsResult it)
    • cas

      public long cas()
      Returns the CAS value of document at the time of loading.

      Note that if the document does not exist, this will return 0!

      The CAS value is an opaque identifier which is associated with a specific state of the document on the server. It can be used during a subsequent mutation to make sure that the document has not been modified in the meantime.

      If document on the server has been modified in the meantime the SDK will raise a CasMismatchException. In this case the caller is expected to re-do the whole "fetch-modify-update" cycle again. Please refer to the SDK documentation for more information on CAS mismatches and subsequent retries.

    • exists

      public boolean exists()
      True if the document exists, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object