annotate src/org/dancres/blitz/stats/TaskQueueStat.java @ 34:6f68e94c1fb8 default tip

Add CondensedStats monitoring utility, equivalent to vmstat
author Dominic Cleal <dominic-cleal@cdo2.com>
date Thu, 05 Aug 2010 11:07:25 +0100
parents 3dc0c5604566
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
1 package org.dancres.blitz.stats;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
2
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
3 /**
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
4 */
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
5 public class TaskQueueStat implements Stat {
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
6 private long _id;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
7 private String _queueName;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
8 private int _size;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
9
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
10 public TaskQueueStat(long anId, String aQueueName, int aSize) {
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
11 _id = anId;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
12 _queueName = aQueueName;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
13 _size = aSize;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
14 }
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
15
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
16 public long getId() {
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
17 return _id;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
18 }
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
19
34
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
20 public String getQueueName() {
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
21 return _queueName;
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
22 }
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
23
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
24 public int getQueueSize() {
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
25 return _size;
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
26 }
6f68e94c1fb8 Add CondensedStats monitoring utility, equivalent to vmstat
Dominic Cleal <dominic-cleal@cdo2.com>
parents: 0
diff changeset
27
0
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
28 public String toString() {
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
29 return "Queue: " + _queueName + " size: " + _size;
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
30 }
3dc0c5604566 Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff changeset
31 }