[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Tue Jul 18 06:50:45 EDT 2006
User: msurtani
Date: 06/07/18 06:50:45
Modified: src/org/jboss/cache/interceptors CacheMgmtInterceptor.java
Log:
Checked in new Habanero interfaces
Updated codebase to deal with new interfaces
Revision Changes Path
1.16 +82 -85 JBossCache/src/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheMgmtInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheMgmtInterceptor.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- CacheMgmtInterceptor.java 6 Jun 2006 10:17:14 -0000 1.15
+++ CacheMgmtInterceptor.java 18 Jul 2006 10:50:45 -0000 1.16
@@ -43,7 +43,7 @@
/**
* Captures cache management statistics
* @author Jerry Gauthier
- * @version $Id: CacheMgmtInterceptor.java,v 1.15 2006/06/06 10:17:14 msurtani Exp $
+ * @version $Id: CacheMgmtInterceptor.java,v 1.16 2006/07/18 10:50:45 msurtani Exp $
*/
public class CacheMgmtInterceptor extends Interceptor implements CacheMgmtInterceptorMBean, NotificationBroadcaster
{
@@ -108,7 +108,7 @@
/**
* Pass the method on and capture cache statistics
- * @param m
+ * @param
* @return
* @throws Throwable
*/
@@ -345,7 +345,7 @@
}
// Handler for TreeCache events
- private class CacheMgmtListener extends AbstractTreeCacheListener
+ private class CacheMgmtListener implements CacheListener
{
CacheMgmtListener()
{
@@ -355,61 +355,92 @@
return m_seq.increment();
}
- public void cacheStarted(TreeCache cache)
+ public void cacheStarted(CacheSPI cache)
{
Notification n = new Notification(NOTIF_CACHE_STARTED, this, seq(), MSG_CACHE_STARTED);
n.setUserData(cache.getServiceName());
m_broadcaster.sendNotification(n);
}
- public void cacheStopped(TreeCache cache)
+ public void cacheStopped(CacheSPI cache)
{
Notification n = new Notification(NOTIF_CACHE_STOPPED, this, seq(), MSG_CACHE_STOPPED);
n.setUserData(cache.getServiceName());
m_broadcaster.sendNotification(n);
}
- public void nodeCreated(Fqn fqn)
+ public void nodeCreated(Fqn fqn, boolean pre, boolean isLocal)
+ {
+ if (pre)
{
Notification n = new Notification(NOTIF_NODE_CREATED, this, seq(), MSG_NODE_CREATED);
n.setUserData(fqn.toString());
m_broadcaster.sendNotification(n);
}
+ }
- public void nodeEvicted(Fqn fqn)
+ public void nodeEvicted(Fqn fqn, boolean pre, boolean isLocal)
{
- Notification n = new Notification(NOTIF_NODE_EVICTED, this, seq(), MSG_NODE_EVICTED);
- n.setUserData(fqn.toString());
+ Notification n;
+ if (pre)
+ n = new Notification(NOTIF_NODE_EVICT, this, seq(), MSG_NODE_EVICT);
+ else
+ n = new Notification(NOTIF_NODE_EVICTED, this, seq(), MSG_NODE_EVICTED);
+ n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre)});
m_broadcaster.sendNotification(n);
}
- public void nodeLoaded(Fqn fqn)
+ public void nodeLoaded(Fqn fqn, boolean pre, Map data)
+ {
+ if (!pre)
{
Notification n = new Notification(NOTIF_NODE_LOADED, this, seq(), MSG_NODE_LOADED);
n.setUserData(fqn.toString());
m_broadcaster.sendNotification(n);
}
+ }
- public void nodeModified(Fqn fqn)
+ public void nodeModified(Fqn fqn, boolean pre, boolean isLocal, Map data)
{
- Notification n = new Notification(NOTIF_NODE_MODIFIED, this, seq(), MSG_NODE_MODIFIED);
- n.setUserData(fqn.toString());
+ Notification n;
+ if (pre)
+ n = new Notification(NOTIF_NODE_MODIFY, this, seq(), MSG_NODE_MODIFY);
+ else
+ n = new Notification(NOTIF_NODE_MODIFY, this, seq(), MSG_NODE_MODIFIED);
+ n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre), Boolean.valueOf(isLocal)});
m_broadcaster.sendNotification(n);
+
}
- public void nodeRemoved(Fqn fqn)
+ public void nodeRemoved(Fqn fqn, boolean pre, boolean isLocal, Map data)
+ {
+ if (pre)
+ {
+ Notification n;
+ if (pre)
+ n = new Notification(NOTIF_NODE_REMOVE, this, seq(), MSG_NODE_REMOVE);
+ else
+ n = new Notification(NOTIF_NODE_REMOVED, this, seq(), MSG_NODE_REMOVED);
+ n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre), Boolean.valueOf(isLocal)});
+ m_broadcaster.sendNotification(n);
+ }
+ else
{
Notification n = new Notification(NOTIF_NODE_REMOVED, this, seq(), MSG_NODE_REMOVED);
n.setUserData(fqn.toString());
m_broadcaster.sendNotification(n);
}
+ }
- public void nodeVisited(Fqn fqn)
+ public void nodeVisited(Fqn fqn, boolean pre)
+ {
+ if (pre)
{
Notification n = new Notification(NOTIF_NODE_VISITED, this, seq(), MSG_NODE_VISITED);
n.setUserData(fqn.toString());
m_broadcaster.sendNotification(n);
}
+ }
public void viewChange(View view)
{
@@ -418,7 +449,7 @@
m_broadcaster.sendNotification(n);
}
- public void nodeActivate(Fqn fqn, boolean pre)
+ public void nodeActivated(Fqn fqn, boolean pre)
{
Notification n;
if (pre)
@@ -429,29 +460,7 @@
m_broadcaster.sendNotification(n);
}
- public void nodeEvict(Fqn fqn, boolean pre)
- {
- Notification n;
- if (pre)
- n = new Notification(NOTIF_NODE_EVICT, this, seq(), MSG_NODE_EVICT);
- else
- n = new Notification(NOTIF_NODE_EVICT, this, seq(), MSG_NODE_EVICTED);
- n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre)});
- m_broadcaster.sendNotification(n);
- }
-
- public void nodeModify(Fqn fqn, boolean pre, boolean isLocal)
- {
- Notification n;
- if (pre)
- n = new Notification(NOTIF_NODE_MODIFY, this, seq(), MSG_NODE_MODIFY);
- else
- n = new Notification(NOTIF_NODE_MODIFY, this, seq(), MSG_NODE_MODIFIED);
- n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre), Boolean.valueOf(isLocal)});
- m_broadcaster.sendNotification(n);
- }
-
- public void nodePassivate(Fqn fqn, boolean pre)
+ public void nodePassivated(Fqn fqn, boolean pre)
{
Notification n;
if (pre)
@@ -461,18 +470,6 @@
n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre)});
m_broadcaster.sendNotification(n);
}
-
- public void nodeRemove(Fqn fqn, boolean pre, boolean isLocal)
- {
- Notification n;
- if (pre)
- n = new Notification(NOTIF_NODE_REMOVE, this, seq(), MSG_NODE_REMOVE);
- else
- n = new Notification(NOTIF_NODE_REMOVE, this, seq(), MSG_NODE_REMOVED);
- n.setUserData(new Object[]{fqn.toString(), Boolean.valueOf(pre), Boolean.valueOf(isLocal)});
- m_broadcaster.sendNotification(n);
- }
-
}
}
More information about the jboss-cvs-commits
mailing list