Commit 597b0f50 authored by afreyssin's avatar afreyssin
Browse files

Allows access to Engine statistics.

parent aa1eda05
......@@ -246,6 +246,30 @@ public final class AgentServer {
return engine;
}
/**
* Returns the load averages for the last minute.
* @return the load averages for the last minute.
*/
public static float getEngineAverageLoad1() {
return getEngine().getAverageLoad1();
}
/**
* Returns the load averages for the past 5 minutes.
* @return the load averages for the past 5 minutes.
*/
public static float getEngineAverageLoad5() {
return getEngine().getAverageLoad5();
}
/**
* Returns the load averages for the past 15 minutes.
* @return the load averages for the past 15 minutes.
*/
public static float getEngineAverageLoad15() {
return getEngine().getAverageLoad15();
}
/** Static reference to the transactional monitor. */
static Transaction transaction = null;
......@@ -305,13 +329,13 @@ public final class AgentServer {
return consumers.elements();
}
public static MessageConsumer getConsumer(String domain) throws Exception {
static MessageConsumer getConsumer(String domain) throws Exception {
if (! consumers.containsKey(domain))
throw new Exception("Unknown consumer for domain " + domain);
return (MessageConsumer) consumers.get(domain);
}
public static void removeConsumer(String domain) {
static void removeConsumer(String domain) {
MessageConsumer cons = (MessageConsumer) consumers.remove(domain);
if (cons != null) {
cons.stop();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment