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

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

Best Java code snippets using org.springframework.cache.jcache.interceptor.CacheResultInterceptor.cacheException (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.interceptorCacheResultInterceptorcacheException

Popular methods of CacheResultInterceptor

  • <init>
  • checkForCachedException
    Check for a cached exception. If the exception is found, throw it directly.
  • 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

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Join (org.hibernate.mapping)
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