Package io.quarkus.cache.runtime
Class CacheInterceptor
- java.lang.Object
-
- io.quarkus.cache.runtime.CacheInterceptor
-
- Direct Known Subclasses:
CacheInvalidateAllInterceptor,CacheInvalidateInterceptor,CacheResultInterceptor
public abstract class CacheInterceptor extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCacheInterceptor.ReturnType
-
Field Summary
Fields Modifier and Type Field Description static intBASE_PRIORITY(package private) CacheManagercacheManager(package private) jakarta.enterprise.inject.Instance<CacheKeyGenerator>keyGeneratorprotected static StringUNHANDLED_ASYNC_RETURN_TYPE_MSG
-
Constructor Summary
Constructors Constructor Description CacheInterceptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.smallrye.mutiny.Uni<?>asyncInvocationResultToUni(Object invocationResult, CacheInterceptor.ReturnType returnType)protected ObjectcreateAsyncResult(io.smallrye.mutiny.Uni<Object> cacheValue, CacheInterceptor.ReturnType returnType)protected static CacheInterceptor.ReturnTypedetermineReturnType(Class<?> returnType)protected ObjectgetCacheKey(Cache cache, Class<? extends CacheKeyGenerator> keyGeneratorClass, List<Short> cacheKeyParameterPositions, Method method, Object[] methodParameterValues)protected <T> CacheInterceptionContext<T>getInterceptionContext(jakarta.interceptor.InvocationContext invocationContext, Class<T> interceptorBindingClass, boolean supportsCacheKey)
-
-
-
Field Detail
-
BASE_PRIORITY
public static final int BASE_PRIORITY
- See Also:
- Constant Field Values
-
UNHANDLED_ASYNC_RETURN_TYPE_MSG
protected static final String UNHANDLED_ASYNC_RETURN_TYPE_MSG
- See Also:
- Constant Field Values
-
cacheManager
@Inject CacheManager cacheManager
-
keyGenerator
@Inject jakarta.enterprise.inject.Instance<CacheKeyGenerator> keyGenerator
-
-
Method Detail
-
getInterceptionContext
protected <T> CacheInterceptionContext<T> getInterceptionContext(jakarta.interceptor.InvocationContext invocationContext, Class<T> interceptorBindingClass, boolean supportsCacheKey)
-
getCacheKey
protected Object getCacheKey(Cache cache, Class<? extends CacheKeyGenerator> keyGeneratorClass, List<Short> cacheKeyParameterPositions, Method method, Object[] methodParameterValues)
-
determineReturnType
protected static CacheInterceptor.ReturnType determineReturnType(Class<?> returnType)
-
asyncInvocationResultToUni
protected io.smallrye.mutiny.Uni<?> asyncInvocationResultToUni(Object invocationResult, CacheInterceptor.ReturnType returnType)
-
createAsyncResult
protected Object createAsyncResult(io.smallrye.mutiny.Uni<Object> cacheValue, CacheInterceptor.ReturnType returnType)
-
-