Example #1
0
 public void abortCompleteCache() {
   if (logger.isLoggable(Level.FINEST)) {
     logger.finest("Cache " + getCacheId() + " caching aborted");
   }
   status = CompletionStatus.NORMAL;
   invalidReads.clear();
   delegate.abortCompleteCache();
 }
Example #2
0
 public void startCompleteCache() {
   if (logger.isLoggable(Level.FINEST)) {
     logger.finest("Cache " + getCacheId() + " starting to complete the cache");
   }
   status = CompletionStatus.GETTING_COMPLETE_CACHE;
   invalidReads = new HashSet<V>();
   delegate.startCompleteCache();
 }
Example #3
0
 public void finishCompleteCache() {
   if (logger.isLoggable(Level.FINEST)) {
     logger.finest("Cache " + getCacheId() + " cache completed");
   }
   if (status == CompletionStatus.GETTING_COMPLETE_CACHE) {
     status = CompletionStatus.CACHE_COMPLETE;
   }
   delegate.finishCompleteCache();
 }
Example #4
0
 public CacheResult<R> readCache(S session, V var) {
   CacheResult<R> result = delegate.readCache(session, var);
   if (result.getResult() == null
       && status == CompletionStatus.CACHE_COMPLETE
       && !invalidReads.contains(var)
       && !result.isValid()) {
     if (logger.isLoggable(Level.FINEST)) {
       logger.finest("Cache " + getCacheId() + " is complete - null is valid.");
     }
     return new CacheResult<R>(null, true);
   }
   return result;
 }
Example #5
0
 public boolean isInvalid() {
   return delegate.isInvalid();
 }
Example #6
0
 public void invalidate(S session) {
   delegate.invalidate(session);
 }
Example #7
0
 public void modifyCache(S session, V var, R value) {
   if (status != CompletionStatus.NORMAL) {
     invalidReads.remove(var);
   }
   delegate.modifyCache(session, var, value);
 }
Example #8
0
 public void updateCache(S session, V var) {
   if (status != CompletionStatus.NORMAL) {
     invalidReads.add(var);
   }
   delegate.updateCache(session, var);
 }
Example #9
0
 public int getCacheId() {
   return delegate.getCacheId();
 }
Example #10
0
 public void flush() {
   localFlush();
   delegate.flush();
 }
Example #11
0
 public int getTransactionNesting(S session) {
   return delegate.getTransactionNesting(session);
 }
Example #12
0
 public void rollbackTransaction(S session) {
   delegate.rollbackTransaction(session);
 }
Example #13
0
 public void commitTransaction(S session) {
   delegate.commitTransaction(session);
 }
Example #14
0
 public void beginTransaction(S session) {
   delegate.beginTransaction(session);
 }