Annotation Interface 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
    An optional name of the collection.
    int
    An optional expiration time for the document.
    Same as expiration() but allows the actual value to be set using standard Spring property sources mechanism.
    An optional time unit for the document's expiration(), if set.
    Defines the default language to be used with this document.
    boolean
    An optional flag indicating whether the expiration timer should be reset whenever the document is directly read.
  • Element Details

    • collection

      String collection
      An optional name of the collection. If the name is not specified, a Class.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 for PropertyResolver.resolveRequiredPlaceholders(String).

      SpEL is NOT supported.
      Default:
      ""
    • language

      String language
      Defines the default language to be used with this document.
      Since:
      1.6
      Default:
      ""
    • expiration

      int expiration
      An optional expiration time for the document. Default is namespace configuration variable "default-ttl" on the server. Ignored if entity has field annotated by Expiration.
      Only one of two might be set at the same time: either expiration or expirationExpression(). See WritePolicy.expiration for possible values.
      Default:
      0
    • expirationExpression

      String expirationExpression
      Same as expiration() but allows the actual value to be set using standard Spring property sources mechanism. Only one might be set at the same time: either expiration() or expirationExpression.
      Syntax is the same as for PropertyResolver.resolveRequiredPlaceholders(String).

      SpEL is NOT supported.
      Default:
      ""
    • expirationUnit

      TimeUnit expirationUnit
      An optional time unit for the document's expiration(), if set. Default is TimeUnit.SECONDS.
      Default:
      SECONDS
    • touchOnRead

      boolean touchOnRead
      An optional flag indicating whether the expiration timer should be reset whenever the document is directly read.
      Default:
      false