User: juhalindfors
Date: 01/04/16 14:55:19
Modified: src/org/jboss/admin/dataholder BeanCacheEntry.java
MemoryMonitorEntry.java ThreadMonitorEntry.java
Log:
initial cache monitoring + a bunch of other stuff
Revision Changes Path
1.2 +76 -0 admin/src/org/jboss/admin/dataholder/BeanCacheEntry.java
Index: BeanCacheEntry.java
===================================================================
RCS file: /cvsroot/jboss/admin/src/org/jboss/admin/dataholder/BeanCacheEntry.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BeanCacheEntry.java 2001/02/18 20:10:36 1.1
+++ BeanCacheEntry.java 2001/04/16 21:55:19 1.2
@@ -17,7 +17,11 @@
private String application = "<undefined>";
private String bean = "<undefined>";
private String type = "<undefined>";
+ private String activity = "<undefined>";
private long time = 0;
+ private int size = 0;
+ private int capacity = 0;
+ private int oldCapacity = 0;
/*
*************************************************************************
@@ -44,6 +48,44 @@
setBean(msg.getStringProperty("BEAN"));
setType(msg.getStringProperty("TYPE"));
setTime(msg.getLongProperty("TIME"));
+
+ if (getType().equals("RESIZER")) {
+ setOldCapacity(msg.getIntProperty("OLD_CAPACITY"));
+ setCapacity(msg.getIntProperty("NEW_CAPACITY"));
+ setSize(msg.getIntProperty("SIZE"));
+ }
+
+ if (getType().equals("PASSIVATION")) {
+ setActivity(msg.getStringProperty("ACTIVITY"));
+ }
+
+ if (getType().equals("ACTIVATION")) {
+ // no additional information
+ }
+
+ if (getType().equals("OVERAGER")) {
+ setSize(msg.getIntProperty("SIZE"));
+ }
+
+ if (getType().equals("CACHE")) {
+ setActivity(msg.getStringProperty("ACTIVITY"));
+
+ if (getActivity().equals("REMOVE")) {
+ setCapacity(msg.getIntProperty("CAPACITY"));
+ setSize(msg.getIntProperty("SIZE"));
+ }
+
+ if (getActivity().equals("ADD")) {
+ setCapacity(msg.getIntProperty("CAPACITY"));
+ setSize(msg.getIntProperty("SIZE"));
+ }
+
+ if (getActivity().equals("CAPACITY")) {
+ setOldCapacity(msg.getIntProperty("OLD_CAPACITY"));
+ setCapacity(msg.getIntProperty("NEW_CAPACITY"));
+ setSize(msg.getIntProperty("SIZE"));
+ }
+ }
}
/*
@@ -95,6 +137,40 @@
return time;
}
+ public int getCapacity() {
+ return capacity;
+ }
+
+ public void setCapacity(int capacity) {
+
+System.out.println("entry cap: " + capacity);
+
+ this.capacity = capacity;
+ }
+
+ public int getOldCapacity() {
+ return oldCapacity;
+ }
+
+ public void setOldCapacity(int capacity) {
+ this.oldCapacity = capacity;
+ }
+
+ public int getSize() {
+ return size;
+ }
+
+ public void setSize(int size) {
+ this.size = size;
+ }
+
+ public void setActivity(String activity) {
+ this.activity = activity;
+ }
+
+ public String getActivity() {
+ return activity;
+ }
/*
*************************************************************************
*
1.2 +2 -2 admin/src/org/jboss/admin/dataholder/MemoryMonitorEntry.java
Index: MemoryMonitorEntry.java
===================================================================
RCS file:
/cvsroot/jboss/admin/src/org/jboss/admin/dataholder/MemoryMonitorEntry.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MemoryMonitorEntry.java 2001/02/18 20:10:36 1.1
+++ MemoryMonitorEntry.java 2001/04/16 21:55:19 1.2
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*
* This package and its source code is available at www.jboss.org
- * $Id: MemoryMonitorEntry.java,v 1.1 2001/02/18 20:10:36 juha Exp $
+ * $Id: MemoryMonitorEntry.java,v 1.2 2001/04/16 21:55:19 juhalindfors Exp $
*/
package org.jboss.admin.dataholder;
@@ -61,7 +61,7 @@
}
public MemoryMonitorEntry(Message msg) throws JMSException {
- setType(msg.getStringProperty(TYPE));
+ setType(msg.getStringProperty("TYPE"));
setTime(msg.getJMSTimestamp());
setFreeMem(msg.getLongProperty("FreeMem"));
setTotalMem(msg.getLongProperty("TotalMem"));
1.2 +2 -2 admin/src/org/jboss/admin/dataholder/ThreadMonitorEntry.java
Index: ThreadMonitorEntry.java
===================================================================
RCS file:
/cvsroot/jboss/admin/src/org/jboss/admin/dataholder/ThreadMonitorEntry.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ThreadMonitorEntry.java 2001/02/18 20:10:36 1.1
+++ ThreadMonitorEntry.java 2001/04/16 21:55:19 1.2
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*
* This package and its source code is available at www.jboss.org
- * $Id: ThreadMonitorEntry.java,v 1.1 2001/02/18 20:10:36 juha Exp $
+ * $Id: ThreadMonitorEntry.java,v 1.2 2001/04/16 21:55:19 juhalindfors Exp $
*/
package org.jboss.admin.dataholder;
@@ -61,7 +61,7 @@
public ThreadMonitorEntry(Message msg) throws JMSException {
- setType(msg.getStringProperty(MetricsConstants.TYPE));
+ setType(msg.getStringProperty("TYPE"));
setTime(msg.getJMSTimestamp());
setThreadCount(msg.getIntProperty("ThreadCount"));
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development