[jboss-cvs] JBossCache/tests/perf/org/jboss/cache/test/perf ...
Manik Surtani
manik at jboss.org
Thu Jun 28 12:53:38 EDT 2007
User: msurtani
Date: 07/06/28 12:53:38
Modified: tests/perf/org/jboss/cache/test/perf Server.java
Log:
Notification changes
Revision Changes Path
1.5 +8 -51 JBossCache/tests/perf/org/jboss/cache/test/perf/Server.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Server.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/test/perf/Server.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Server.java 11 Jun 2007 12:58:18 -0000 1.4
+++ Server.java 28 Jun 2007 16:53:37 -0000 1.5
@@ -12,15 +12,15 @@
import org.jboss.aop.Advised;
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheImpl;
-import org.jboss.cache.CacheListener;
-import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
+import org.jboss.cache.notifications.annotation.CacheListener;
+import org.jboss.cache.notifications.annotation.ViewChanged;
+import org.jboss.cache.notifications.event.ViewChangedEvent;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.transaction.DummyTransactionManager;
-import org.jgroups.View;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
@@ -29,7 +29,6 @@
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import java.util.Properties;
import java.util.Random;
import java.util.StringTokenizer;
@@ -334,7 +333,8 @@
// server.destroyCache();
}
- public static class ViewListener implements CacheListener
+ @CacheListener
+ public static class ViewListener
{
List addrList_; // List of address
@@ -343,9 +343,10 @@
addrList_ = addrList;
}
- public void viewChange(View new_view) // might be MergeView after merging
+ @ViewChanged
+ public void viewChange(ViewChangedEvent vce)
{
- Vector vector = new_view.getMembers();
+ Vector vector = vce.getNewView().getMembers();
if (vector.size() > addrList_.size())
{
// We have more members than is specified!
@@ -359,50 +360,6 @@
isReady_ = true;
}
}
-
- public void cacheStarted(CacheSPI cache)
- {
- }
-
- public void cacheStopped(CacheSPI cache)
- {
- }
-
- public void nodeActivated(Fqn fqn, boolean pre, Map<Object, Object> data)
- {
- }
-
- public void nodeCreated(Fqn fqn, boolean pre, boolean isLocal)
- {
- }
-
- public void nodeEvicted(Fqn fqn, boolean pre, boolean isLocal)
- {
- }
-
- public void nodeLoaded(Fqn fqn, boolean pre, Map<Object, Object> data)
- {
- }
-
- public void nodeModified(Fqn fqn, boolean pre, boolean isLocal, ModificationType modType, Map<Object, Object> data)
- {
- }
-
- public void nodeMoved(Fqn from, Fqn to, boolean pre, boolean isLocal)
- {
- }
-
- public void nodePassivated(Fqn fqn, boolean pre, Map<Object, Object> data)
- {
- }
-
- public void nodeRemoved(Fqn fqn, boolean pre, boolean isLocal, Map<Object, Object> data)
- {
- }
-
- public void nodeVisited(Fqn fqn, boolean pre)
- {
- }
}
public static class Loader extends Thread
More information about the jboss-cvs-commits
mailing list