Annotation Interface KeySpace


@Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface KeySpace
Marker interface for methods with Persistent annotations indicating the presence of a dedicated keyspace the entity should reside in. If present the value will be picked up for resolving the keyspace. The value() attribute supports SpEL expressions to dynamically resolve the keyspace based on a per-operation basis.
 @Persistent
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ ElementType.TYPE })
 static @interface CacheCentricAnnotation {

        @AliasFor(annotation = KeySpace.class, attribute = "value")
        String cacheRegion() default "";
 }

 @CacheCentricAnnotation(cacheRegion = "customers")
 class Customer {
        // ...
 }
 
Can also be directly used on types to indicate the keyspace.
 @KeySpace("persons")
 public class Foo {

 }
 
Author:
Christoph Strobl, Mark Paluch
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      String value
      Returns:
      dedicated keyspace the entity should reside in.
      Default:
      ""