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

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

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

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
  • 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

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • JTextField (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
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