Annotation Interface Options
Scope Annotation
- Author:
- Michael Reiche
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptioncom.couchbase.client.java.analytics.AnalyticsScanConsistency
Specifies a custom scan consistency for analytics queries.Specifies the scope nameString[]
Specifies a custom array of distinct fields.int
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.String[]
Specifies a custom projection.com.couchbase.client.java.query.QueryScanConsistency
Specifies a custom scan consistency for N1QL queries.Specifies the scope namelong
An timeout for the operation.
-
Element Details
-
scope
String scopeSpecifies the scope name- Returns:
- the scope name configured, defaults to not DEFAULT_SCOPE.
- Default:
- "_default"
-
collection
String collectionSpecifies the scope name- Returns:
- the scope name configured, defaults to not DEFAULT_SCOPE.
- Default:
- "_default"
-
query
com.couchbase.client.java.query.QueryScanConsistency querySpecifies a custom scan consistency for N1QL queries.- Returns:
- the scan consistency configured, defaults to not bounded.
- Default:
- NOT_BOUNDED
-
analytics
com.couchbase.client.java.analytics.AnalyticsScanConsistency analyticsSpecifies a custom scan consistency for analytics queries.- Returns:
- the scan consistency configured, defaults to not bounded.
- Default:
- NOT_BOUNDED
-
project
String[] projectSpecifies a custom projection.- Returns:
- the projection configured, defaults to an empty array (project everything).
- Default:
- {}
-
distinct
String[] distinctSpecifies a custom array of distinct fields.- Returns:
- the projection configured, we need to do something tricky with the default. We need to default to
no distinct, which is specified by a null array (an empty array means distinct on everything). We'll make an array of a single element "-" mean no distinct.
- Default:
- {"-"}
-
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
-
timeoutMs
long timeoutMsAn timeout for the operation. Default is no timeout.- Default:
- 0L
-