Author: woonsan
Date: Tue Jul 16 20:50:08 2013
New Revision: 1503879

URL: http://svn.apache.org/r1503879
Log:
JS2-1284: wrapping raw ehcache element by EhCacheDistributedElementImpl as 
refList is designed to hold key-EhCacheDistributedElementImpl value pair

Modified:
    
portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheDistributedImpl.java

Modified: 
portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheDistributedImpl.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheDistributedImpl.java?rev=1503879&r1=1503878&r2=1503879&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheDistributedImpl.java
 (original)
+++ 
portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheDistributedImpl.java
 Tue Jul 16 20:50:08 2013
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -135,7 +135,7 @@ public class EhCacheDistributedImpl exte
                return ehcache.removeQuiet(key);
 
        }
-       
+
     public void clear()
     {
         // invoke removeAll with local flag set
@@ -155,7 +155,7 @@ public class EhCacheDistributedImpl exte
         else
             remoteListeners.add(listener);
     }
-    
+
     public void removeEventListener(JetspeedCacheEventListener listener, 
boolean local)
     {
         if (local)
@@ -163,7 +163,7 @@ public class EhCacheDistributedImpl exte
         else
             remoteListeners.remove(listener);
     }
-    
+
        public void evictContentForUser(RequestContext context)
        {
                return;
@@ -178,7 +178,7 @@ public class EhCacheDistributedImpl exte
        {
                return null;
        }
-       
+
    public void dispose()
     {
                if (refList != null)
@@ -187,14 +187,14 @@ public class EhCacheDistributedImpl exte
                        refList = null;
                        temp.clear();
                }
-               else 
+               else
                        return;
                if (this.ehcache != null)
                {
                        ehcache = null;
                }
     }
-       
+
     protected void notifyListeners(boolean local, int action, Object key, 
Object value)
     {
         List listeners = (local?localListeners:remoteListeners);
@@ -226,9 +226,9 @@ public class EhCacheDistributedImpl exte
             {
                 e.printStackTrace();
             }
-        }       
+        }
     }
-   
+
        public void notifyElement( Ehcache cache, boolean local,Element arg1, 
int action)
        {
                if (cache != this.ehcache)
@@ -245,7 +245,7 @@ public class EhCacheDistributedImpl exte
                                if (action < 0)
                                        refList.remove(arg1.getKey());
                                else if (action == CacheElement.ActionAdded)
-                                       refList.put(arg1.getKey(), arg1);
+                                       refList.put(arg1.getKey(), new 
EhCacheDistributedElementImpl(arg1));
                                e.notifyChange(action);
                    notifyListeners(local, action, arg1.getKey(), 
arg1.getObjectValue());
                        }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscr...@portals.apache.org
For additional commands, e-mail: jetspeed-dev-h...@portals.apache.org

Reply via email to