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

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

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

Popular methods of CacheResultInterceptor

  • <init>
  • cacheException
  • checkForCachedException
    Check for a cached exception. If the exception is found, throw it directly.
  • cloneException
  • doGet
  • doPut
  • extractFrom
  • findCommonAncestorIndex
  • generateKey
  • invoke
  • 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

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getSystemService (Context)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
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