[jboss-cvs] JBossAS SVN: r71446 - projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Mar 30 10:53:26 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-03-30 10:53:25 -0400 (Sun, 30 Mar 2008)
New Revision: 71446

Modified:
   projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/impl/TransactionalCache.java
Log:
[EJBTHREE-1026] Rename 'delegate' field to 'backingCache'

Modified: projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/impl/TransactionalCache.java
===================================================================
--- projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/impl/TransactionalCache.java	2008-03-30 11:41:12 UTC (rev 71445)
+++ projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/impl/TransactionalCache.java	2008-03-30 14:53:25 UTC (rev 71446)
@@ -65,7 +65,7 @@
    protected final Logger log = Logger.getLogger(getClass().getName());
    
    /** BackingCache that handles passivation, groups, etc */
-   private final BackingCache<C, T> delegate;
+   private final BackingCache<C, T> backingCache;
    
    /** Cache of items that are in use by a tx or non-transactional invocation */
    private final ConcurrentMap<Object, Entry> inUseCache;
@@ -139,11 +139,11 @@
                              SynchronizationCoordinator syncCoordinator,
                              boolean strictGroups)
    {
-      assert delegate != null : "delegate is null";
+      assert delegate != null : "backingCache is null";
       assert tm != null : "tm is null";
       assert syncCoordinator != null : "syncCoordinator is null";
       
-      this.delegate = delegate;
+      this.backingCache = delegate;
       this.tm = tm;
       this.synchronizationCoordinator = syncCoordinator;
       this.strictGroups = strictGroups;
@@ -200,11 +200,11 @@
       entry.lock.lock();
       try
       {
-         T backingEntry = delegate.create(initTypes, initValues, sharedState);
+         T backingEntry = backingCache.create(initTypes, initValues, sharedState);
          C obj = backingEntry.getUnderlyingItem();
          
          // Note we deliberately don't assign obj to entry -- we want
-         // a call to get() to get it from delegate so delegate can lock it
+         // a call to get() to get it from backingCache so backingCache can lock it
          
          Entry old = inUseCache.putIfAbsent(obj.getId(), entry);
          if (old != null)
@@ -247,7 +247,7 @@
       try
       {
          if (entry.obj == null)
-            entry.obj = delegate.get(key).getUnderlyingItem();
+            entry.obj = backingCache.get(key).getUnderlyingItem();
          
          validateTransaction(entry.obj);
          entry.getCount++;
@@ -295,27 +295,27 @@
    {
       // Note that the object is not in my cache at this point.
       // FIXME BES 2008/03/10 -- above comment not true!
-      delegate.remove(key);
+      backingCache.remove(key);
       inUseCache.remove(key);
    }
 
    public void start()
    {
-      delegate.start();
+      backingCache.start();
    }
 
    public void stop()
    {
-      delegate.stop();
+      backingCache.stop();
    }
    
    public BackingCache<C, T> getBackingCache()
    {
-      return delegate;
+      return backingCache;
    }
 
    /**
-    * Actually release the object from our delegate 
+    * Actually release the object from our backingCache 
     * @param obj
     */
    private void release(C obj)
@@ -338,8 +338,8 @@
       try
       {
          entry.lock.lockInterruptibly();
-         // For sure we now control this key -- tell delegate to release
-         delegate.release(obj.getId());
+         // For sure we now control this key -- tell backingCache to release
+         backingCache.release(obj.getId());
          
          // Now remove the entry
          inUseCache.remove(key);




More information about the jboss-cvs-commits mailing list