User: juhalindfors
Date: 01/04/16 14:55:20
Modified: src/org/jboss/admin/monitor/tree ApplicationTreeModel.java
BeanCacheTreeNode.java BeanTreeNode.java
MethodTreeNode.java
Log:
initial cache monitoring + a bunch of other stuff
Revision Changes Path
1.3 +6 -0 admin/src/org/jboss/admin/monitor/tree/ApplicationTreeModel.java
Index: ApplicationTreeModel.java
===================================================================
RCS file:
/cvsroot/jboss/admin/src/org/jboss/admin/monitor/tree/ApplicationTreeModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ApplicationTreeModel.java 2001/02/18 20:27:38 1.2
+++ ApplicationTreeModel.java 2001/04/16 21:55:20 1.3
@@ -13,6 +13,7 @@
import org.jboss.admin.dataholder.InvocationEntry;
import org.jboss.admin.dataholder.BeanCacheEntry;
import org.jboss.admin.monitor.graph.InvocationTimeGraphModel;
+import org.jboss.admin.monitor.graph.BeanCacheGraphModel;
/**
@@ -90,6 +91,11 @@
ApplicationTreeNode appNode = root.addApplication(applicationName);
BeanTreeNode beanNode = appNode.addBean(beanName);
BeanCacheTreeNode cacheNode = beanNode.addBeanCache();
+
+ // Add the bean cache entry to the graph model associated with
+ // the bean cache node
+ BeanCacheGraphModel graphModel = cacheNode.getGraphModel();
+ graphModel.appendBeanCacheEntry(entry);
}
}
1.2 +20 -11 admin/src/org/jboss/admin/monitor/tree/BeanCacheTreeNode.java
Index: BeanCacheTreeNode.java
===================================================================
RCS file:
/cvsroot/jboss/admin/src/org/jboss/admin/monitor/tree/BeanCacheTreeNode.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BeanCacheTreeNode.java 2001/02/18 20:27:38 1.1
+++ BeanCacheTreeNode.java 2001/04/16 21:55:20 1.2
@@ -1,13 +1,15 @@
package org.jboss.admin.monitor.tree;
// standard imports
+import javax.swing.JComponent;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.Vector;
// non-standard class dependencies
-//import org.jboss.admin.monitor.graph.InvocationTimeGraphModel;
+import org.jboss.admin.monitor.graph.BeanCacheGraphModel;
+import org.jboss.admin.monitor.BeanCacheStatsView;
+import org.jboss.admin.monitor.event.GraphModelListener;
-
/**
*
* @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>
@@ -19,13 +21,12 @@
private final static boolean ALLOW_CHILDREN = false;
/*
- * each node contains a reference to the graph model that visualizes
- * the data received as TxEntries from metrics invocation layer
+ * ...
*
* initialized in the constructor
*/
- //private InvocationTimeGraphModel graphModel = null;
-
+ private BeanCacheGraphModel graphModel = null;
+ private JComponent statsView = null;
/*
*************************************************************************
@@ -45,9 +46,13 @@
// superclass creates children collection lazily but I want it
// to be around right after construction to avoid making NPE checks
children = new Vector();
+
+ // initialize the graph model and stats view for this node
+ graphModel = new BeanCacheGraphModel();
+ statsView = new BeanCacheStatsView();
- // initialize the graph model for this node
- //graphModel = new InvocationTimeGraphModel();
+ // have the stats view listen to the model
+ graphModel.addGraphModelListener((GraphModelListener)statsView);
}
/*
@@ -62,9 +67,13 @@
* each method node contains a reference to a graph model that represents
* the data from the metrics invocation layer
*/
- //public InvocationTimeGraphModel getGraphModel() {
- // return graphModel;
- //}
+ public BeanCacheGraphModel getGraphModel() {
+ return graphModel;
+ }
+
+ public JComponent getStatsView() {
+ return statsView;
+ }
/*
*************************************************************************
1.3 +12 -2 admin/src/org/jboss/admin/monitor/tree/BeanTreeNode.java
Index: BeanTreeNode.java
===================================================================
RCS file: /cvsroot/jboss/admin/src/org/jboss/admin/monitor/tree/BeanTreeNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BeanTreeNode.java 2001/02/18 20:27:38 1.2
+++ BeanTreeNode.java 2001/04/16 21:55:20 1.3
@@ -83,7 +83,12 @@
add(node);
- ((RootNode)getRoot()).getTreeModel().nodeStructureChanged(this);
+ // start continuous update
+ node.getGraphModel().startContinuousUpdate();
+ node.getGraphModel().setUpdateInterval(3000);
+
+ // update the tree view
+ ((RootNode)getRoot()).getTreeModel().nodesWereInserted(node, new int[]
{getChildCount() - 1});
return node;
}
@@ -101,8 +106,13 @@
// insert cache as first node
insert(node, 0);
+
+ // start continuous update
+ node.getGraphModel().startContinuousUpdate();
+ node.getGraphModel().setUpdateInterval(3000);
- ((RootNode)getRoot()).getTreeModel().nodeStructureChanged(this);
+ // update the tree view
+ ((RootNode)getRoot()).getTreeModel().nodesWereInserted(node, new int[] {0});
return node;
}
1.2 +1 -1 admin/src/org/jboss/admin/monitor/tree/MethodTreeNode.java
Index: MethodTreeNode.java
===================================================================
RCS file: /cvsroot/jboss/admin/src/org/jboss/admin/monitor/tree/MethodTreeNode.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MethodTreeNode.java 2000/12/17 20:11:25 1.1
+++ MethodTreeNode.java 2001/04/16 21:55:20 1.2
@@ -20,7 +20,7 @@
/*
* each node contains a reference to the graph model that visualizes
- * the data received as TxEntries from metrics invocation layer
+ * the data received as InvocationEntries from metrics invocation layer
*
* initialized in the constructor
*/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development