Codota Logo
CacheResultInterceptor.checkForCachedException
Code IndexAdd Codota to your IDE (free)

How to use
checkForCachedException
method
in
org.springframework.cache.jcache.interceptor.CacheResultInterceptor

Best Java code snippets using org.springframework.cache.jcache.interceptor.CacheResultInterceptor.checkForCachedException (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-framework

@Override
@Nullable
protected Object invoke(
    CacheOperationInvocationContext<CacheResultOperation> context, CacheOperationInvoker invoker) {
  CacheResultOperation operation = context.getOperation();
  Object cacheKey = generateKey(context);
  Cache cache = resolveCache(context);
  Cache exceptionCache = resolveExceptionCache(context);
  if (!operation.isAlwaysInvoked()) {
    Cache.ValueWrapper cachedValue = doGet(cache, cacheKey);
    if (cachedValue != null) {
      return cachedValue.get();
    }
    checkForCachedException(exceptionCache, cacheKey);
  }
  try {
    Object invocationResult = invoker.invoke();
    doPut(cache, cacheKey, invocationResult);
    return invocationResult;
  }
  catch (CacheOperationInvoker.ThrowableWrapper ex) {
    Throwable original = ex.getOriginal();
    cacheException(exceptionCache, operation.getExceptionTypeFilter(), cacheKey, original);
    throw ex;
  }
}
origin: org.springframework/spring-context-support

@Override
@Nullable
protected Object invoke(
    CacheOperationInvocationContext<CacheResultOperation> context, CacheOperationInvoker invoker) {
  CacheResultOperation operation = context.getOperation();
  Object cacheKey = generateKey(context);
  Cache cache = resolveCache(context);
  Cache exceptionCache = resolveExceptionCache(context);
  if (!operation.isAlwaysInvoked()) {
    Cache.ValueWrapper cachedValue = doGet(cache, cacheKey);
    if (cachedValue != null) {
      return cachedValue.get();
    }
    checkForCachedException(exceptionCache, cacheKey);
  }
  try {
    Object invocationResult = invoker.invoke();
    doPut(cache, cacheKey, invocationResult);
    return invocationResult;
  }
  catch (CacheOperationInvoker.ThrowableWrapper ex) {
    Throwable original = ex.getOriginal();
    cacheException(exceptionCache, operation.getExceptionTypeFilter(), cacheKey, original);
    throw ex;
  }
}
origin: apache/servicemix-bundles

@Override
protected Object invoke(CacheOperationInvocationContext<CacheResultOperation> context,
    CacheOperationInvoker invoker) {
  CacheResultOperation operation = context.getOperation();
  Object cacheKey = generateKey(context);
  Cache cache = resolveCache(context);
  Cache exceptionCache = resolveExceptionCache(context);
  if (!operation.isAlwaysInvoked()) {
    Cache.ValueWrapper cachedValue = doGet(cache, cacheKey);
    if (cachedValue != null) {
      return cachedValue.get();
    }
    checkForCachedException(exceptionCache, cacheKey);
  }
  try {
    Object invocationResult = invoker.invoke();
    doPut(cache, cacheKey, invocationResult);
    return invocationResult;
  }
  catch (CacheOperationInvoker.ThrowableWrapper ex) {
    Throwable original = ex.getOriginal();
    cacheException(exceptionCache, operation.getExceptionTypeFilter(), cacheKey, original);
    throw ex;
  }
}
org.springframework.cache.jcache.interceptorCacheResultInterceptorcheckForCachedException

Javadoc

Check for a cached exception. If the exception is found, throw it directly.

Popular methods of CacheResultInterceptor

  • <init>
  • cacheException
  • cloneException
  • doGet
  • doPut
  • extractFrom
  • findCommonAncestorIndex
  • generateKey
  • invoke
  • resolveCache
  • resolveExceptionCache
  • rewriteCallStack
    Rewrite the call stack of the specified exception so that it matches the current call stack up to (i
  • resolveExceptionCache,
  • rewriteCallStack

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getSystemService (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now