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.
 @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.
 public class Foo {

Christoph Strobl, Mark Paluch
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
  • Element Details

    • value

      String value
      dedicated keyspace the entity should reside in.