|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Simon
Simon interface contains common functions related to Simon management - enable/disable and hierarchy. It does not contain any real action method - these are in specific interfaces that describes purpose of the particular type of monitor.
Manager,
for Simon counting some events,
for Simon measuring time spans| Method Summary | |
|---|---|
long |
getFirstUsage()
Returns ms timestamp of the first usage of this Simon. |
List<Simon> |
getChildren()
Returns list of children - direct sub-simons. |
long |
getLastReset()
Returns ms timestamp of the last recent usage of the reset() method on the Simon. |
long |
getLastUsage()
Returns ms timestamp of the last usage of this Simon. |
String |
getName()
Returns Simon name. |
String |
getNote()
Returns note for the Simon. |
Simon |
getParent()
Returns parent Simon. |
SimonState |
getState()
Returns state of the Simon that can be enabled, disabled or ihnerited. |
boolean |
isEnabled()
Returns true, if the Simon is enabled or if the enabled state is inherited. |
Simon |
reset()
Resets the Simon values related to the measuring, timestamps and so on - usage timestamps, state, attributes are not affected. |
Sample |
sample()
Samples Simon values and returns them in a Java Bean derived from Sample interface. |
Sample |
sampleAndReset()
Samples Simon values and returns them in a Java Bean derived from Sample interface and resets the Simon. |
void |
setNote(String note)
Sets note for the Simon. |
void |
setState(SimonState state,
boolean overrule)
Sets the state of the Simon. |
| Methods inherited from interface org.javasimon.HasAttributes |
|---|
getAttribute, getAttribute, getAttributeNames, getCopyAsSortedMap, removeAttribute, setAttribute |
| Method Detail |
|---|
String getName()
null for anonymous Simons.
Simon getParent()
List<Simon> getChildren()
SimonState getState()
void setState(SimonState state,
boolean overrule)
state - a new state.overrule - specifies whether this change is forced to the whole subtree.boolean isEnabled()
Simon reset()
getLastReset(). Reset is perfomed even for disabled Simons.
long getLastReset()
reset() method on the Simon.
Returns 0 if reset was not called yet. This timestamp is useful for rate measuring
when reset is called on a regular basis - likely via sampleAndReset(). While
client code could store the timestamp too it is not necessary with this method.
String getNote()
void setNote(String note)
note - note for the Simon.long getFirstUsage()
long getLastUsage()
Sample sample()
Sample sampleAndReset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||