test_class.declarator: NS = "SOME_NS"
test_class.modifier: private static final
test_class.original_string: private static final String NS = "SOME_NS";
test_class.type: String
test_class.var_name: NS
test_class.declarator: expectedValue
test_class.modifier: private
test_class.original_string: private Object expectedValue;
test_class.type: Object
test_class.var_name: expectedValue
test_class.file: simple-spring-memcached/src/test/java/com/google/code/ssm/aop/InvalidateSingleCacheAdviceTest.java
test_class.identifier: InvalidateSingleCacheAdviceTest
test_class.superclass: extends AbstractCacheTest<InvalidateSingleCacheAdvice>
test_case.body: @Test
      public void valid() throws Throwable {
          Assume.assumeTrue(isValid);
  
          when(pjp.proceed()).thenReturn(expectedValue);
  
          assertEquals(expectedValue, advice.cacheInvalidateSingle(pjp));
  
          verify(cache).delete(cacheKey);
          verify(pjp).proceed();
      }
test_case.class_method_signature: InvalidateSingleCacheAdviceTest.valid()
test_case.full_signature: @Test public void valid()
test_case.identifier: valid
test_case.invocations: assumeTrue thenReturn when proceed assertEquals cacheInvalidateSingle delete verify proceed verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void valid()
focal_class.declarator: LOG = LoggerFactory.getLogger(InvalidateSingleCacheAdvice.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(InvalidateSingleCacheAdvice.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: simple-spring-memcached/src/main/java/com/google/code/ssm/aop/InvalidateSingleCacheAdvice.java
focal_class.identifier: InvalidateSingleCacheAdvice
focal_class.class_method_signature: InvalidateSingleCacheAdvice.invalidateSingle()
focal_class.full_signature: @Pointcut("@annotation(com.google.code.ssm.api.InvalidateSingleCache)") public void invalidateSingle()
focal_class.identifier: invalidateSingle
focal_class.modifiers: @Pointcut("@annotation(com.google.code.ssm.api.InvalidateSingleCache)") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void invalidateSingle()
focal_class.class_method_signature: InvalidateSingleCacheAdvice.cacheInvalidateSingle(final ProceedingJoinPoint pjp)
focal_class.full_signature: @Around("invalidateSingle()") public Object cacheInvalidateSingle(final ProceedingJoinPoint pjp)
focal_class.identifier: cacheInvalidateSingle
focal_class.modifiers: @Around("invalidateSingle()") public
focal_class.parameters: (final ProceedingJoinPoint pjp)
focal_class.return: Object
focal_class.signature: Object cacheInvalidateSingle(final ProceedingJoinPoint pjp)
focal_class.class_method_signature: InvalidateSingleCacheAdvice.getLogger()
focal_class.full_signature: @Override protected Logger getLogger()
focal_class.identifier: getLogger
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: Logger
focal_class.signature: Logger getLogger()
focal_class.superclass: extends CacheAdvice
focal_method.body: @Around("invalidateSingle()")
      public Object cacheInvalidateSingle(final ProceedingJoinPoint pjp) throws Throwable {
          if (isDisabled()) {
              getLogger().info("Cache disabled");
              return pjp.proceed();
          }
  
          // This is injected caching. If anything goes wrong in the caching, LOG
          // the crap outta it, but do not let it surface up past the AOP injection itself.
          String cacheKey = null;
          final AnnotationData data;
          final Method methodToCache;
          try {
              methodToCache = getCacheBase().getMethodToCache(pjp, InvalidateSingleCache.class);
              final InvalidateSingleCache annotation = methodToCache.getAnnotation(InvalidateSingleCache.class);
              data = AnnotationDataBuilder.buildAnnotationData(annotation, InvalidateSingleCache.class, methodToCache);
              if (!data.isReturnKeyIndex()) {
                  cacheKey = getCacheBase().getCacheKeyBuilder().getCacheKey(data, pjp.getArgs(), methodToCache.toString());
              }
          } catch (Exception ex) {
              warn(ex, "Caching on method %s and key [%s] aborted due to an error.", pjp.toShortString(), cacheKey);
              return pjp.proceed();
          }
  
          final Object result = pjp.proceed();
  
          // This is injected caching. If anything goes wrong in the caching, LOG
          // the crap outta it, but do not let it surface up past the AOP injection itself.
          try {
              if (data.isReturnKeyIndex()) {
                  getCacheBase().verifyReturnTypeIsNoVoid(methodToCache, InvalidateSingleCache.class);
                  cacheKey = getCacheBase().getCacheKeyBuilder().getCacheKey(result, data.getNamespace());
              }
  
              getCacheBase().getCache(data).delete(cacheKey);
          } catch (Exception ex) {
              warn(ex, "Caching on method %s and key [%s] aborted due to an error.", pjp.toShortString(), cacheKey);
          }
          return result;
      }
focal_method.class_method_signature: InvalidateSingleCacheAdvice.cacheInvalidateSingle(final ProceedingJoinPoint pjp)
focal_method.full_signature: @Around("invalidateSingle()") public Object cacheInvalidateSingle(final ProceedingJoinPoint pjp)
focal_method.identifier: cacheInvalidateSingle
focal_method.invocations: isDisabled info getLogger proceed getMethodToCache getCacheBase getAnnotation buildAnnotationData isReturnKeyIndex getCacheKey getCacheKeyBuilder getCacheBase getArgs toString warn toShortString proceed proceed isReturnKeyIndex verifyReturnTypeIsNoVoid getCacheBase getCacheKey getCacheKeyBuilder getCacheBase getNamespace delete getCache getCacheBase warn toShortString
focal_method.modifiers: @Around("invalidateSingle()") public
focal_method.parameters: (final ProceedingJoinPoint pjp)
focal_method.return: Object
focal_method.signature: Object cacheInvalidateSingle(final ProceedingJoinPoint pjp)