- Common ways to obtain CacheEvictOperation
private void myMethod () {CacheEvictOperation c =
(CacheEvictOperation) context.metadata.operation
CacheEvictOperation.Builder cacheEvictOperationBuilder;cacheEvictOperationBuilder.build()
CacheEvictOperation.Builder cacheEvictOperationBuilder;new CacheEvictOperation(cacheEvictOperationBuilder)
- Smart code suggestions by Codota
}
public CacheEvictOperation build() { return new CacheEvictOperation(this); } }
private void processCacheEvicts( Collection<CacheOperationContext> contexts, boolean beforeInvocation, @Nullable Object result) { for (CacheOperationContext context : contexts) { CacheEvictOperation operation = (CacheEvictOperation) context.metadata.operation; if (beforeInvocation == operation.isBeforeInvocation() && isConditionPassing(context, result)) { performCacheEvict(context, operation, result); } } }
private void performCacheEvict( CacheOperationContext context, CacheEvictOperation operation, @Nullable Object result) { Object key = null; for (Cache cache : context.getCaches()) { if (operation.isCacheWide()) { logInvalidating(context, operation, null); doClear(cache); } else { if (key == null) { key = generateKey(context, result); } logInvalidating(context, operation, key); doEvict(cache, key); } } }
private void performCacheEvict( CacheOperationContext context, CacheEvictOperation operation, @Nullable Object result) { Object key = null; for (Cache cache : context.getCaches()) { if (operation.isCacheWide()) { logInvalidating(context, operation, null); doClear(cache); } else { if (key == null) { key = generateKey(context, result); } logInvalidating(context, operation, key); doEvict(cache, key); } } }
private void processCacheEvicts( Collection<CacheOperationContext> contexts, boolean beforeInvocation, @Nullable Object result) { for (CacheOperationContext context : contexts) { CacheEvictOperation operation = (CacheEvictOperation) context.metadata.operation; if (beforeInvocation == operation.isBeforeInvocation() && isConditionPassing(context, result)) { performCacheEvict(context, operation, result); } } }
public CacheEvictOperation build() { return new CacheEvictOperation(this); } }
private void performCacheEvict( CacheOperationContext context, CacheEvictOperation operation, @Nullable Object result) { Object key = null; for (Cache cache : context.getCaches()) { if (operation.isCacheWide()) { logInvalidating(context, operation, null); doClear(cache); } else { if (key == null) { key = generateKey(context, result); } logInvalidating(context, operation, key); doEvict(cache, key); } } }
private void processCacheEvicts( Collection<CacheOperationContext> contexts, boolean beforeInvocation, @Nullable Object result) { for (CacheOperationContext context : contexts) { CacheEvictOperation operation = (CacheEvictOperation) context.metadata.operation; if (beforeInvocation == operation.isBeforeInvocation() && isConditionPassing(context, result)) { performCacheEvict(context, operation, result); } } }
public CacheEvictOperation build() { return new CacheEvictOperation(this); } }