14.3.2.3.2. Create a Qualifier Annotation
To use CDI to return a specific cache, create custom cache qualifier annotations as follows:
@javax.inject.Qualifier @Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface SmallCache {}
Use the created
@SmallCache
qualifier to specify how to create specific caches.