javax.cache.annotation.GeneratedCacheKey Java Examples
The following examples show how to use
javax.cache.annotation.GeneratedCacheKey.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VaultProxyCacheKeyGenerator.java From component-runtime with Apache License 2.0 | 5 votes |
@Override public GeneratedCacheKey generateCacheKey(final CacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext) { return new GeneratedCacheKeyImpl(Stream .concat(Stream.of(cacheKeyInvocationContext.getKeyParameters()).map(CacheInvocationParameter::getValue), getContextualKeys()) .toArray(Object[]::new)); }
Example #2
Source File: CacheKeyGeneratorImpl.java From commons-jcs with Apache License 2.0 | 5 votes |
@Override public GeneratedCacheKey generateCacheKey(final CacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext) { final CacheInvocationParameter[] keyParameters = cacheKeyInvocationContext.getKeyParameters(); final Object[] parameters = new Object[keyParameters.length]; for (int index = 0; index < keyParameters.length; index++) { parameters[index] = keyParameters[index].getValue(); } return new GeneratedCacheKeyImpl(parameters); }
Example #3
Source File: TestableCacheKeyGenerator.java From spring-analysis-note with MIT License | 4 votes |
@Override public GeneratedCacheKey generateCacheKey(CacheKeyInvocationContext<? extends Annotation> context) { return new SimpleGeneratedCacheKey(context.getKeyParameters()[0]); }
Example #4
Source File: TestableCacheKeyGenerator.java From java-technology-stack with MIT License | 4 votes |
@Override public GeneratedCacheKey generateCacheKey(CacheKeyInvocationContext<? extends Annotation> context) { return new SimpleGeneratedCacheKey(context.getKeyParameters()[0]); }
Example #5
Source File: TestableCacheKeyGenerator.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override public GeneratedCacheKey generateCacheKey(CacheKeyInvocationContext<? extends Annotation> context) { return new SimpleGeneratedCacheKey(context.getKeyParameters()[0]); }