Annotation Interface Document


Identifies a domain object to be persisted to Couchbase.
Author:
Michael Nitschinger, Andrey Rubtsov, Tigran Babloyan
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    com.couchbase.client.core.msg.kv.DurabilityLevel
    The optional durabilityLevel for all mutating operations, allows the application to wait until this replication (or persistence) is successful before proceeding
    int
    An optional expiry time for the document.
    Same as expiry() but allows the actual value to be set using standard Spring property sources mechanism.
    An optional time unit for the document's expiry(), if set.
    com.couchbase.client.java.kv.PersistTo
    How many persisted copies of the modified record must exist on the given document.
    com.couchbase.client.java.query.QueryScanConsistency
    An optional string indicating the query scan consistency
    com.couchbase.client.java.kv.ReplicateTo
    How many replicas must this documents operations be propagated to.
    boolean
    An optional flag associated with expiry() indicating whether the expiry timer should be reset whenever the document is directly read (eg. findByOne, findById).
  • Element Details

    • expiry

      An optional expiry time for the document. Default is no expiry. Only one of two might might be set at the same time: either expiry() or expiryExpression()
      Default:
      0
    • expiryExpression

      @AliasFor(annotation=Expiry.class, attribute="expiryExpression") String expiryExpression
      Same as expiry() but allows the actual value to be set using standard Spring property sources mechanism. Only one might be set at the same time: either expiry() or expiryExpression().
      Syntax is the same as for PropertyResolver.resolveRequiredPlaceholders(String).

      The value will be recalculated for every CouchbaseTemplate save/insert/update call, thus allowing actual expiration to reflect changes on-the-fly as soon as property sources change.

      SpEL is NOT supported.
      Default:
      ""
    • expiryUnit

      An optional time unit for the document's expiry(), if set. Default is TimeUnit.SECONDS.
      Default:
      SECONDS
    • touchOnRead

      boolean touchOnRead
      An optional flag associated with expiry() indicating whether the expiry timer should be reset whenever the document is directly read (eg. findByOne, findById).
      Default:
      false
    • queryScanConsistency

      @AliasFor(annotation=ScanConsistency.class, attribute="query") com.couchbase.client.java.query.QueryScanConsistency queryScanConsistency
      An optional string indicating the query scan consistency
      Default:
      NOT_BOUNDED
    • persistTo

      com.couchbase.client.java.kv.PersistTo persistTo
      How many persisted copies of the modified record must exist on the given document. Default is PersistTo.NONE. For Couchbase version >= 6.5 see durabilityLevel().
      Default:
      NONE
    • replicateTo

      com.couchbase.client.java.kv.ReplicateTo replicateTo
      How many replicas must this documents operations be propagated to. Default is ReplicateTo.NONE. For Couchbase version >= 6.5 see durabilityLevel().
      Default:
      NONE
    • durabilityLevel

      com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel
      The optional durabilityLevel for all mutating operations, allows the application to wait until this replication (or persistence) is successful before proceeding
      Default:
      NONE