io.quarkus.cache.runtime.CacheKeyParameterPositions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-cache Show documentation
Show all versions of quarkus-cache Show documentation
Enable application data caching in CDI beans
package io.quarkus.cache.runtime;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import jakarta.enterprise.util.Nonbinding;
import jakarta.interceptor.InterceptorBinding;
/**
* This interceptor binding is added at build time on a method if:
*
* - it is annotated with {@link io.quarkus.cache.CacheResult CacheResult} or {@link io.quarkus.cache.CacheInvalidate
* CacheInvalidate}
* - at least one of its arguments is annotated with {@link io.quarkus.cache.CacheKey CacheKey}
*
* It helps improving performances by storing at build time the positions of {@link io.quarkus.cache.CacheKey
* CacheKey}-annotated arguments instead of relying on reflection at run time (which is bad for performances) to identify these
* positions.
*/
@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface CacheKeyParameterPositions {
@Nonbinding
short[] value() default {};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy