Class CacheGetInterceptor

java.lang.Object
com.oracle.coherence.cdi.AbstractCacheInterceptor
com.oracle.coherence.cdi.CacheGetInterceptor

@Interceptor @Priority(1005) public class CacheGetInterceptor extends AbstractCacheInterceptor
A CDI interceptor that returns cached value if present; otherwise it returns and caches result of target method invocation.
  • Constructor Details

  • Method Details

    • cacheGet

      public Object cacheGet(jakarta.interceptor.InvocationContext ctxInvocation) throws Exception
      Returns cached value if available; otherwise invokes target method and stores invocation result in the cache before returning it.
      Parameters:
      ctxInvocation - the invocation context
      Returns:
      the cached value if available; otherwise returns the result of the invocation of the target method
      Throws:
      Exception - if thrown by target method