[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/impl ...
Manik Surtani
manik at jboss.org
Mon Jun 11 11:06:05 EDT 2007
User: msurtani
Date: 07/06/11 11:06:05
Modified: src/org/jboss/cache/pojo/impl CacheListenerAdaptor.java
Log:
generics-related tweaks
Revision Changes Path
1.4 +17 -18 JBossCache/src/org/jboss/cache/pojo/impl/CacheListenerAdaptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheListenerAdaptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/impl/CacheListenerAdaptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- CacheListenerAdaptor.java 7 Jun 2007 05:50:20 -0000 1.3
+++ CacheListenerAdaptor.java 11 Jun 2007 15:06:03 -0000 1.4
@@ -22,23 +22,14 @@
package org.jboss.cache.pojo.impl;
-import static org.jboss.cache.pojo.impl.InternalConstant.POJOCACHE_OPERATION;
-import static org.jboss.cache.pojo.impl.InternalConstant.POJOCACHE_STATUS;
-
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.AbstractCacheListener;
import org.jboss.cache.Fqn;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheListener;
+import static org.jboss.cache.pojo.impl.InternalConstant.POJOCACHE_OPERATION;
+import static org.jboss.cache.pojo.impl.InternalConstant.POJOCACHE_STATUS;
import org.jboss.cache.pojo.interceptors.PojoTxLockInterceptor;
import org.jboss.cache.pojo.notification.AttachNotification;
import org.jboss.cache.pojo.notification.DetachNotification;
@@ -49,7 +40,15 @@
import org.jboss.cache.pojo.notification.NotificationContext;
import org.jboss.cache.pojo.notification.SetModifyNotification;
-// $Id: CacheListenerAdaptor.java,v 1.3 2007/06/07 05:50:20 jgreene Exp $
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+// $Id: CacheListenerAdaptor.java,v 1.4 2007/06/11 15:06:03 msurtani Exp $
/**
* Adapts the core cache listener API into the POJO listener API.
@@ -86,7 +85,7 @@
private FieldModifyNotification createModifyEvent(Fqn fqn, String key, Object value, boolean local)
{
if (value instanceof PojoReference)
- value = cache.find(((PojoReference)value).getFqn().toString());
+ value = cache.find(((PojoReference) value).getFqn().toString());
Object o = cache.find(fqn.toString());
Field f;
@@ -146,24 +145,24 @@
int i = Integer.parseInt(fqn.getLastElementAsString());
ListModifyNotification.Operation operation = ListModifyNotification.Operation.valueOf(data.get(POJOCACHE_OPERATION).toString());
Object value = cache.find(fqn.toString());
- sendNotification(new ListModifyNotification(this, (List)collection, operation, i, value, isLocal), matched);
+ sendNotification(new ListModifyNotification(this, (List) collection, operation, i, value, isLocal), matched);
}
else if (collection instanceof Set)
{
SetModifyNotification.Operation operation = SetModifyNotification.Operation.valueOf(data.get(POJOCACHE_OPERATION).toString());
Object value = cache.find(fqn.toString());
- sendNotification(new SetModifyNotification(this, (Set)collection, operation, value, isLocal), matched);
+ sendNotification(new SetModifyNotification(this, (Set) collection, operation, value, isLocal), matched);
}
else if (collection instanceof Map)
{
MapModifyNotification.Operation operation = MapModifyNotification.Operation.valueOf(data.get(POJOCACHE_OPERATION).toString());
Object value = cache.find(fqn.toString());
- sendNotification(new MapModifyNotification(this, (Map)collection, operation, fqn.getLastElement(), value, isLocal), matched);
+ sendNotification(new MapModifyNotification(this, (Map) collection, operation, fqn.getLastElement(), value, isLocal), matched);
}
}
else if ("ATTACHED".equals(cache.getCache().get(fqn, POJOCACHE_STATUS)))
{
- for (Map.Entry<Object, Object> entry : data.entrySet())
+ for (Map.Entry entry : data.entrySet())
{
String key = entry.getKey().toString();
Object value = entry.getValue();
@@ -177,7 +176,7 @@
}
else if (modType == ModificationType.REMOVE_DATA)
{
- for (Map.Entry<Object, Object> entry : data.entrySet())
+ for (Map.Entry entry : data.entrySet())
{
String key = entry.getKey().toString();
if (internalKeys.contains(key))
More information about the jboss-cvs-commits
mailing list