|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.ui.monitoring.data.StatsHandler
public final class StatsHandler
This class provides a convenient access to the statistics obtained from the JPPF server.
| Field Summary |
|---|
| Fields inherited from interface org.jppf.ui.monitoring.data.StatsConstants |
|---|
ALL_FIELDS, CONNECTION_PROPS, EXECUTION_PROPS, NODE_EXECUTION_PROPS, QUEUE_PROPS, TRANSPORT_PROPS |
| Method Summary | |
|---|---|
void |
addStatsHandlerListener(StatsHandlerListener listener)
Register a StatsHandlerListener with this stats formatter. |
String |
changeSettings(String algorithm,
Map params)
Request the server settings. |
void |
connectionFailed(ClientEvent event)
Notifiy this listener that a driver connection has failed. |
JMXDriverConnectionWrapper |
currentJmxConnection()
Get the JMX connection for the current driver connection. |
void |
fireStatsHandlerEvent(StatsHandlerEvent.Type type)
Notify all listeners of a change in this stats formatter. |
JPPFClientConnection |
getCurrentConnection()
Get the current client connection for which statistics and charts are displayed. |
Map<Fields,Double> |
getDoubleValues(int position)
Get the mapping of a data snapshot's fields, at a specified position, to their corresponding double values. |
static StatsHandler |
getInstance()
Get the singleton instance of this class. |
JPPFClient |
getJppfClient(ClientListener clientListener)
JPPF client used to submit data udpate and administration requests. |
Map<Fields,Double> |
getLatestDoubleValues()
Get the mapping of the most recent data snapshot's fields to their corresponding double values. |
JPPFStats |
getLatestStats()
Get the latest data snapshot. |
Map<Fields,String> |
getLatestStringValues()
Get the mapping of the most recent data snapshot's fields to their corresponding string values. |
long |
getRefreshInterval()
Get the interval between refreshes from the server. |
int |
getRolloverPosition()
Get the number of data snapshots kept in memory. |
OptionElement |
getServerListOption()
Get the option containing the combobox with the list of driver connections. |
JPPFStats |
getStats(int position)
Get the data snapshot at a specified position. |
int |
getStatsCount()
Get the current number of data snapshots. |
Map<Fields,String> |
getStringValues(int position)
Get the mapping of a data snapshot's fields, at a specified position, to their corresponding string values. |
int |
getTickCount()
Get the number of data updates so far. |
void |
newConnection(ClientEvent event)
Notifiy this listener that a new driver connection was created. |
void |
removeStatsHandlerListener(StatsHandlerListener listener)
Unregister a StatsHandlerListener from this stats formatter. |
String |
requestShutdownRestart(Number shutdownDelay,
Number restartDelay)
Shutdown, and eventually restart, the server. |
void |
requestUpdate()
Request an update from the current server conenction. |
void |
requestUpdate(JPPFClientConnectionImpl c)
Request an update from the server. |
void |
setCurrentConnection(JPPFClientConnectionImpl connection)
Set the current client connection for which statistics and charts are displayed. |
void |
setRefreshInterval(long refreshInterval)
Set the interval between refreshes from the server. |
void |
setRolloverPosition(int rolloverPosition)
Set the number of data snapshots kept in memory. |
void |
setServerListOption(OptionElement serverListOption)
Set the option containing the combobox with the list of driver connections. |
void |
stopRefreshTimer()
Stop the automatic refresh of the stats through a timer. |
void |
update(JPPFClientConnection connection,
JPPFStats stats)
Update the current statistics with new values obtained from the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static StatsHandler getInstance()
StatsHandler instance.public void stopRefreshTimer()
public long getRefreshInterval()
public void setRefreshInterval(long refreshInterval)
refreshInterval - the interval in milliseconds.public void requestUpdate()
public void requestUpdate(JPPFClientConnectionImpl c)
c - the client connection to request the data from.
public String changeSettings(String algorithm,
Map params)
algorithm - - the name of the load-balancing algorithm to set on the server.params - - the algorithm's parameters.
public String requestShutdownRestart(Number shutdownDelay,
Number restartDelay)
shutdownDelay - - the delay before shutting down.restartDelay - - the delay, starting after shutdown, before restarting. If it is < 0, no restart occurs.
public void update(JPPFClientConnection connection,
JPPFStats stats)
connection - - the client connection from which the data is obtained.stats - - the object holding the new statistics values.public void addStatsHandlerListener(StatsHandlerListener listener)
StatsHandlerListener with this stats formatter.
listener - - the listener to register.public void removeStatsHandlerListener(StatsHandlerListener listener)
StatsHandlerListener from this stats formatter.
listener - - the listener to unregister.public void fireStatsHandlerEvent(StatsHandlerEvent.Type type)
type - - the type of event to fire.public int getRolloverPosition()
public void setRolloverPosition(int rolloverPosition)
rolloverPosition - - the rollover position as an int value.public int getStatsCount()
public JPPFStats getStats(int position)
position - - the position to get the data at.
JPPFStats instance.public JPPFStats getLatestStats()
JPPFStats instance.public Map<Fields,String> getStringValues(int position)
position - - the position to get the data at.
public Map<Fields,String> getLatestStringValues()
public Map<Fields,Double> getDoubleValues(int position)
position - - the position to get the data at.
public Map<Fields,Double> getLatestDoubleValues()
public int getTickCount()
public JPPFClientConnection getCurrentConnection()
JPPFClientConnection instance.public void setCurrentConnection(JPPFClientConnectionImpl connection)
connection - a JPPFClientConnection instance.public JPPFClient getJppfClient(ClientListener clientListener)
clientListener - a listener to register with the JPPF client.
JPPFClient instance.public void newConnection(ClientEvent event)
newConnection in interface ClientListenerevent - the event to notify this listener of.ClientListener.newConnection(org.jppf.client.event.ClientEvent)public void connectionFailed(ClientEvent event)
connectionFailed in interface ClientListenerevent - the event to notify this listener of.public OptionElement getServerListOption()
OptionElement instance.public void setServerListOption(OptionElement serverListOption)
serverListOption - an OptionElement instance.public JMXDriverConnectionWrapper currentJmxConnection()
JMXDriverConnectionWrapper instance.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||