Annotation Type Document
@Inherited @Retention(RUNTIME) @Target(TYPE) public @interface Document
Identifies a domain object to be persisted to Aerospike.
- Author:
- Peter Milne, Jean Mercier
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringcollectionAn optional name of the collection.intexpirationAn optional expiration time for the document.StringexpirationExpressionSame asexpiration()but allows the actual value to be set using standard Spring property sources mechanism.TimeUnitexpirationUnitAn optional time unit for the document'sexpiration(), if set.StringlanguageDefines the default language to be used with this document.booleantouchOnReadAn optional flag associated indicating whether the expiration timer should be reset whenever the document is directly read
-
Element Details
-
collection
String collectionAn optional name of the collection. If the name is not specified, aClass.getSimpleName()of the entity's class will be used. Allows the actual value to be set using standard Spring property sources mechanism. Syntax is the same as forPropertyResolver.resolveRequiredPlaceholders(String).
SpEL is NOT supported.- Default:
- ""
-
language
String languageDefines the default language to be used with this document.- Since:
- 1.6
- Default:
- ""
-
expiration
int expirationAn optional expiration time for the document. Default is namespace configuration variable "default-ttl" on the server. Ignored if entity has field annotated byExpiration
Only one of two might might be set at the same time: either expiration orexpirationExpression()SeeWritePolicy.expirationfor possible values.- Default:
- 0
-
expirationExpression
String expirationExpressionSame asexpiration()but allows the actual value to be set using standard Spring property sources mechanism. Only one might be set at the same time: eitherexpiration()or expirationExpression.
Syntax is the same as forPropertyResolver.resolveRequiredPlaceholders(String).
SpEL is NOT supported.- Default:
- ""
-
expirationUnit
TimeUnit expirationUnitAn optional time unit for the document'sexpiration(), if set. Default isTimeUnit.SECONDS.- Default:
- SECONDS
-
touchOnRead
boolean touchOnReadAn optional flag associated indicating whether the expiration timer should be reset whenever the document is directly read- Default:
- false
-