|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fdda.core.impl.StatisticsImpl
Implementation of statistics interface. One instance of this class is used by each Demonstrator.
Constructor Summary | |
StatisticsImpl()
Constructor |
Method Summary | |
void |
addActiveNode(Node node)
Adds an active node. |
void |
addConnectionFailure()
Adds 1 to the count of connection failures |
void |
addConnectionRecovery()
Adds 1 to the count of connection recoveries |
void |
addNodeFailure()
Adds 1 to the count of node failures |
void |
addNodeRecovery()
Adds 1 to the count of node recoveries |
void |
addReceivedMessage()
Adds 1 to the count of received messages |
void |
addSentMessage()
Adds 1 to count of sent messages |
void |
addStartedNode()
Adds 1 to the count of started nodes |
void |
addUsedConnection(Connection connection)
Adds a connection to the used connections. |
void |
addUsedNode(Node node)
Adds a node to the used nodes. |
int |
getActiveNodes()
Returns the number of nodes that were active at one point of time |
int |
getConnectionFailures()
Returns the number of connection failures (either not working at start or broken down during demo) |
int |
getConnectionRecoveries()
Returns the number of connections that recovered during the demo |
int |
getCurrentlyActiveMessages()
Returns the number of messages that are currently active |
int |
getCurrentlyActiveNodes()
Returns the number of nodes that are currently active |
int |
getCurrentlyPausedNodes()
Returns the number of nodes that are currently paused |
int |
getNodeFailures()
Returns the number of node failures (either not working at start or broken down during demo) |
int |
getNodeRecoveries()
Returns the number of nodes that recovered during the demo |
int |
getPresentConnections()
Returns the number of connections in the project |
int |
getPresentNodes()
Returns the number of nodes in the project |
int |
getReceivedMessages()
Returns the number of received messages |
int |
getSentMessages()
Returns the number of sent messages |
int |
getStartedNodes()
Returns the number of started nodes |
int |
getUsedConnections()
Returns the number of connections that were used |
int |
getUsedNodes()
Returns the number of nodes that were used (either started, or active, or received a message) |
void |
reset()
Resets the statistics. |
void |
setConnectionFailures(int number)
Sets the number of connection failures |
void |
setCurrentlyActiveMessages(int number)
Sets the number of currently active messages |
void |
setCurrentlyActiveNodes(int number)
Sets the number of currently active nodes |
void |
setCurrentlyPausedNodes(int number)
Sets the number of currently paused nodes |
void |
setNodeFailures(int number)
Sets the number of node failures |
void |
setPresentConnections(int number)
Sets the number of present connections |
void |
setPresentNodes(int number)
Sets the number of present nodes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatisticsImpl()
Method Detail |
public void reset()
public int getSentMessages()
Statistics
getSentMessages
in interface Statistics
public void addSentMessage()
public int getReceivedMessages()
Statistics
getReceivedMessages
in interface Statistics
public void addReceivedMessage()
public int getStartedNodes()
Statistics
getStartedNodes
in interface Statistics
public void addStartedNode()
public int getActiveNodes()
Statistics
getActiveNodes
in interface Statistics
public void addActiveNode(Node node)
node
- the nodepublic int getCurrentlyActiveNodes()
Statistics
getCurrentlyActiveNodes
in interface Statistics
public void setCurrentlyActiveNodes(int number)
number
- the numberpublic int getCurrentlyPausedNodes()
Statistics
getCurrentlyPausedNodes
in interface Statistics
public void setCurrentlyPausedNodes(int number)
number
- the numberpublic int getCurrentlyActiveMessages()
Statistics
getCurrentlyActiveMessages
in interface Statistics
public void setCurrentlyActiveMessages(int number)
number
- the numberpublic int getUsedNodes()
Statistics
getUsedNodes
in interface Statistics
public void addUsedNode(Node node)
node
- the nodepublic int getPresentNodes()
Statistics
getPresentNodes
in interface Statistics
public void setPresentNodes(int number)
number
- the numberpublic int getUsedConnections()
Statistics
getUsedConnections
in interface Statistics
public void addUsedConnection(Connection connection)
connection
- the connectionpublic int getPresentConnections()
Statistics
getPresentConnections
in interface Statistics
public void setPresentConnections(int number)
number
- the numberpublic int getNodeFailures()
Statistics
getNodeFailures
in interface Statistics
public void addNodeFailure()
public void setNodeFailures(int number)
number
- the numberpublic int getConnectionFailures()
Statistics
getConnectionFailures
in interface Statistics
public void addConnectionFailure()
public void setConnectionFailures(int number)
number
- the numberpublic int getNodeRecoveries()
Statistics
getNodeRecoveries
in interface Statistics
public void addNodeRecovery()
public int getConnectionRecoveries()
Statistics
getConnectionRecoveries
in interface Statistics
public void addConnectionRecovery()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |