diff --git a/src/main/java/org/springframework/data/keyvalue/annotation/KeySpace.java b/src/main/java/org/springframework/data/keyvalue/annotation/KeySpace.java index e63a36b..3a54dc3 100644 --- a/src/main/java/org/springframework/data/keyvalue/annotation/KeySpace.java +++ b/src/main/java/org/springframework/data/keyvalue/annotation/KeySpace.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,38 +27,46 @@ import org.springframework.data.annotation.Persistent; /** * Marker interface for methods with {@link 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. - * + * *
  * 
  * @Persistent
- * @Documented
  * @Retention(RetentionPolicy.RUNTIME)
  * @Target({ ElementType.TYPE })
- * public @interface Document {
- * 
- * 		@KeySpace
- * 		String collection() default "person";
- * } 
+ * 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 + * @author Mark Paluch */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target(value = { METHOD, TYPE }) public @interface KeySpace { + /** + * @return dedicated keyspace the entity should reside in. + */ String value() default ""; }