Annotation Interface TimeToLive


@Retention(RUNTIME) @Documented @Target({FIELD,METHOD}) public @interface TimeToLive
TimeToLive marks a single numeric property on aggregate root to be used for setting expirations in Redis. The annotated property supersedes any other timeout configuration.
 
 @RedisHash
 class Person {
   @Id String id;
   String name;
   @TimeToLive Long timeout;
 }
 
 
Since:
1.7
Author:
Christoph Strobl
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    TimeUnit unit to use.