Annotation Interface Expiry


Expiry annotation
Author:
Michael Nitschinger
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    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.
  • Element Details

    • expiry

      int 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

      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

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