Annotation Interface Document
Identifies a domain object to be persisted to Couchbase.
- Author:
- Michael Nitschinger, Andrey Rubtsov
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
An optional expiry time for the document.Same asexpiry()
but allows the actual value to be set using standard Spring property sources mechanism.An optional time unit for the document'sexpiry()
, if set.com.couchbase.client.java.query.QueryScanConsistency
An optional string indicating the query scan consistencyboolean
An optional flag associated withexpiry()
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: eitherexpiry()
orexpiryExpression()
- Default:
- 0
-
expiryExpression
Same asexpiry()
but allows the actual value to be set using standard Spring property sources mechanism. Only one might be set at the same time: eitherexpiry()
orexpiryExpression()
.
Syntax is the same as forPropertyResolver.resolveRequiredPlaceholders(String)
.
The value will be recalculated for everyCouchbaseTemplate
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'sexpiry()
, if set. Default isTimeUnit.SECONDS
.- Default:
- SECONDS
-
touchOnRead
boolean touchOnReadAn optional flag associated withexpiry()
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 queryScanConsistencyAn optional string indicating the query scan consistency- Default:
- NOT_BOUNDED
-