test_class.declarator: NS = "TEST_NAMESPACE"
test_class.modifier: private static final
test_class.original_string: private static final String NS = "TEST_NAMESPACE";
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/InvalidateAssignCacheAdviceTest.java
test_class.identifier: InvalidateAssignCacheAdviceTest
test_class.superclass: extends AbstractCacheTest<InvalidateAssignCacheAdvice>
test_case.body: @Test
      public void valid() throws Throwable {
          Assume.assumeTrue(isValid);
  
          when(pjp.proceed()).thenReturn(expectedValue);
  
          assertEquals(expectedValue, advice.cacheInvalidateAssign(pjp));
  
          verify(cache).delete(cacheKey);
          verify(pjp).proceed();
      }
test_case.class_method_signature: InvalidateAssignCacheAdviceTest.valid()
test_case.full_signature: @Test public void valid()
test_case.identifier: valid
test_case.invocations: assumeTrue thenReturn when proceed assertEquals cacheInvalidateAssign 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(InvalidateAssignCacheAdvice.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(InvalidateAssignCacheAdvice.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: simple-spring-memcached/src/main/java/com/google/code/ssm/aop/InvalidateAssignCacheAdvice.java
focal_class.identifier: InvalidateAssignCacheAdvice
focal_class.class_method_signature: InvalidateAssignCacheAdvice.invalidateAssign()
focal_class.full_signature: @Pointcut("@annotation(com.google.code.ssm.api.InvalidateAssignCache)") public void invalidateAssign()
focal_class.identifier: invalidateAssign
focal_class.modifiers: @Pointcut("@annotation(com.google.code.ssm.api.InvalidateAssignCache)") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void invalidateAssign()
focal_class.class_method_signature: InvalidateAssignCacheAdvice.cacheInvalidateAssign(final ProceedingJoinPoint pjp)
focal_class.full_signature: @Around("invalidateAssign()") public Object cacheInvalidateAssign(final ProceedingJoinPoint pjp)
focal_class.identifier: cacheInvalidateAssign
focal_class.modifiers: @Around("invalidateAssign()") public
focal_class.parameters: (final ProceedingJoinPoint pjp)
focal_class.return: Object
focal_class.signature: Object cacheInvalidateAssign(final ProceedingJoinPoint pjp)
focal_class.class_method_signature: InvalidateAssignCacheAdvice.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("invalidateAssign()")
      public Object cacheInvalidateAssign(final ProceedingJoinPoint pjp) throws Throwable {
          if (isDisabled()) {
              getLogger().info("Cache disabled");
              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.
          String cacheKey = null;
          try {
              final Method methodToCache = getCacheBase().getMethodToCache(pjp, InvalidateAssignCache.class);
              final InvalidateAssignCache annotation = methodToCache.getAnnotation(InvalidateAssignCache.class);
              final AnnotationData data = AnnotationDataBuilder.buildAnnotationData(annotation, InvalidateAssignCache.class, methodToCache);
  
              cacheKey = getCacheBase().getCacheKeyBuilder().getAssignCacheKey(data);
  
              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: InvalidateAssignCacheAdvice.cacheInvalidateAssign(final ProceedingJoinPoint pjp)
focal_method.full_signature: @Around("invalidateAssign()") public Object cacheInvalidateAssign(final ProceedingJoinPoint pjp)
focal_method.identifier: cacheInvalidateAssign
focal_method.invocations: isDisabled info getLogger proceed proceed getMethodToCache getCacheBase getAnnotation buildAnnotationData getAssignCacheKey getCacheKeyBuilder getCacheBase delete getCache getCacheBase warn toShortString
focal_method.modifiers: @Around("invalidateAssign()") public
focal_method.parameters: (final ProceedingJoinPoint pjp)
focal_method.return: Object
focal_method.signature: Object cacheInvalidateAssign(final ProceedingJoinPoint pjp)