public void abortCompleteCache() {
   if (logger.isLoggable(Level.FINEST)) {
     logger.finest("Cache " + getCacheId() + " caching aborted");
   }
   status = CompletionStatus.NORMAL;
   invalidReads.clear();
   delegate.abortCompleteCache();
 }
 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();
 }
 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();
 }
 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;
 }
 public boolean isInvalid() {
   return delegate.isInvalid();
 }
 public void invalidate(S session) {
   delegate.invalidate(session);
 }
 public void modifyCache(S session, V var, R value) {
   if (status != CompletionStatus.NORMAL) {
     invalidReads.remove(var);
   }
   delegate.modifyCache(session, var, value);
 }
 public void updateCache(S session, V var) {
   if (status != CompletionStatus.NORMAL) {
     invalidReads.add(var);
   }
   delegate.updateCache(session, var);
 }
 public int getCacheId() {
   return delegate.getCacheId();
 }
 public void flush() {
   localFlush();
   delegate.flush();
 }
 public int getTransactionNesting(S session) {
   return delegate.getTransactionNesting(session);
 }
 public void rollbackTransaction(S session) {
   delegate.rollbackTransaction(session);
 }
 public void commitTransaction(S session) {
   delegate.commitTransaction(session);
 }
 public void beginTransaction(S session) {
   delegate.beginTransaction(session);
 }