diff options
Diffstat (limited to 'spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java')
-rw-r--r-- | spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java b/spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java index 450a01fb..88886b6a 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java @@ -47,11 +47,28 @@ public class AnnotatedClassCacheableService implements CacheableService<Object> } @Override + @Cacheable(cacheNames = "testCache", sync = true) + public Object cacheSync(Object arg1) { + return counter.getAndIncrement(); + } + + @Override + @Cacheable(cacheNames = "testCache", sync = true) + public Object cacheSyncNull(Object arg1) { + return null; + } + + @Override public Object conditional(int field) { return null; } @Override + public Object conditionalSync(int field) { + return null; + } + + @Override @Cacheable(cacheNames = "testCache", unless = "#result > 10") public Object unless(int arg) { return arg; @@ -171,6 +188,18 @@ public class AnnotatedClassCacheableService implements CacheableService<Object> throw new UnsupportedOperationException(arg1.toString()); } + @Override + @Cacheable(cacheNames = "testCache", sync = true) + public Object throwCheckedSync(Object arg1) throws Exception { + throw new IOException(arg1.toString()); + } + + @Override + @Cacheable(cacheNames = "testCache", sync = true) + public Object throwUncheckedSync(Object arg1) { + throw new UnsupportedOperationException(arg1.toString()); + } + // multi annotations @Override |