コード例 #1
0
 @CacheEntryModified
 @CacheEntryRemoved
 @CacheEntryVisited
 @CacheEntryCreated
 public void catchEvent(Event e) {
   if (e.isPre()) counter.getAndIncrement();
 }
コード例 #2
0
 @CacheEntryModified
 public void modified(Event ne) {
   if (!ne.isPre()) {
     log.debug("modified visited with key: " + key);
     try {
       // test out if we can get the read lock since there is a write lock going as well.
       cache1.get(key);
     } catch (CacheException e) {
       e.printStackTrace();
       fail("modified: test failed with exception: " + e);
     }
   }
 }
コード例 #3
0
 @CacheEntryModified
 @CacheEntryRemoved
 @CacheEntryEvicted
 public void removed(Event e) {
   if (!e.isPre()) updateCachedDataTable();
 }