@Override public CacheableOperation build() { return new CacheableOperation(this); } }
if (((CacheableOperation) cacheOperationContext.getOperation()).isSync()) { syncEnabled = true; break; "@Cacheable(sync=true) only allows a single cache on '" + operation + "'"); if (StringUtils.hasText(operation.getUnless())) { throw new IllegalStateException( "@Cacheable(sync=true) does not support unless attribute on '" + operation + "'");
protected boolean canPutToCache(@Nullable Object value) { String unless = ""; if (this.metadata.operation instanceof CacheableOperation) { unless = ((CacheableOperation) this.metadata.operation).getUnless(); } else if (this.metadata.operation instanceof CachePutOperation) { unless = ((CachePutOperation) this.metadata.operation).getUnless(); } if (StringUtils.hasText(unless)) { EvaluationContext evaluationContext = createEvaluationContext(value); return !evaluator.unless(unless, this.metadata.methodKey, evaluationContext); } return true; }
if (((CacheableOperation) cacheOperationContext.getOperation()).isSync()) { syncEnabled = true; break; "@Cacheable(sync=true) only allows a single cache on '" + operation + "'"); if (StringUtils.hasText(operation.getUnless())) { throw new IllegalStateException( "@Cacheable(sync=true) does not support unless attribute on '" + operation + "'");
protected boolean canPutToCache(@Nullable Object value) { String unless = ""; if (this.metadata.operation instanceof CacheableOperation) { unless = ((CacheableOperation) this.metadata.operation).getUnless(); } else if (this.metadata.operation instanceof CachePutOperation) { unless = ((CachePutOperation) this.metadata.operation).getUnless(); } if (StringUtils.hasText(unless)) { EvaluationContext evaluationContext = createEvaluationContext(value); return !evaluator.unless(unless, this.metadata.methodKey, evaluationContext); } return true; }
if (((CacheableOperation) cacheOperationContext.getOperation()).isSync()) { syncEnabled = true; break; "@Cacheable(sync=true) only allows a single cache on '" + operation + "'"); if (StringUtils.hasText(operation.getUnless())) { throw new IllegalStateException( "@Cacheable(sync=true) does not support unless attribute on '" + operation + "'");
@Override public CacheableOperation build() { return new CacheableOperation(this); } }
@Override public CacheableOperation build() { return new CacheableOperation(this); } }