Annotation Interface Document
Identifies a domain object to be persisted to Couchbase.
- Author:
- Michael Nitschinger, Andrey Rubtsov, Tigran Babloyan
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionSame asdurabilityLevel()
but allows the actual value to be set using standard Spring property sources mechanism.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 proceedingint
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.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 consistencycom.couchbase.client.java.kv.ReplicateTo
How many replicas must this documents operations be propagated to.boolean
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
-
persistTo
com.couchbase.client.java.kv.PersistTo persistToHow many persisted copies of the modified record must exist on the given document. Default isPersistTo.NONE
. For Couchbase version >= 6.5 seedurabilityLevel()
.- Default:
- NONE
-
replicateTo
com.couchbase.client.java.kv.ReplicateTo replicateToHow many replicas must this documents operations be propagated to. Default isReplicateTo.NONE
. For Couchbase version >= 6.5 seedurabilityLevel()
.- Default:
- NONE
-
durabilityLevel
@AliasFor(annotation=Durability.class, attribute="durabilityLevel") com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevelThe optional durabilityLevel for all mutating operations, allows the application to wait until this replication (or persistence) is successful before proceeding- Default:
- NONE
-
durabilityExpression
@AliasFor(annotation=Durability.class, attribute="durabilityExpression") String durabilityExpressionSame asdurabilityLevel()
but allows the actual value to be set using standard Spring property sources mechanism. Only one might be set at the same time: eitherdurabilityLevel()
ordurabilityExpression()
.
Syntax is the same as forPropertyResolver.resolveRequiredPlaceholders(String)
.
SpEL is NOT supported.- Default:
- ""
-