@Inherited @Retention(value=RUNTIME) @Target(value=TYPE) @ScanConsistency public @interface Document
Modifier and Type | Optional Element and Description |
---|---|
int |
expiry
An optional expiry time for the document.
|
String |
expiryExpression
Same as
expiry() but allows the actual value to be set using standard Spring property sources mechanism. |
TimeUnit |
expiryUnit
An optional time unit for the document's
expiry() , if set. |
com.couchbase.client.java.query.QueryScanConsistency |
queryScanConsistency
An optional string indicating the query scan consistency
|
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). |
@AliasFor(annotation=Expiry.class, attribute="expiry") public abstract int expiry
expiry()
or expiryExpression()
@AliasFor(annotation=Expiry.class, attribute="expiryExpression") public abstract String expiryExpression
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()
. PropertyResolver.resolveRequiredPlaceholders(String)
.
CouchbaseTemplate
save/insert/update call, thus allowing actual expiration to reflect changes on-the-fly as soon as property sources
change. @AliasFor(annotation=Expiry.class, attribute="expiryUnit") public abstract TimeUnit expiryUnit
expiry()
, if set. Default is TimeUnit.SECONDS
.public abstract boolean touchOnRead
expiry()
indicating whether the expiry timer should be reset whenever the
document is directly read (eg. findByOne, findById).@AliasFor(annotation=ScanConsistency.class, attribute="query") public abstract com.couchbase.client.java.query.QueryScanConsistency queryScanConsistency
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.