Annotation Interface Expiry
Expiry annotation
- Author:
- Michael Nitschinger
-
Element Details
-
expiry
int expiryAn 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
String expiryExpressionSame 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
TimeUnit expiryUnitAn optional time unit for the document'sexpiry()
, if set. Default isTimeUnit.SECONDS
.- Default:
- SECONDS
-