|
Kieker 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kieker.monitoring.core.MonitoringController
public final class MonitoringController
Simple class to store monitoring data in the file system. Although a buffered writer is used, outliers (delays of 1000 ms) occur from time to time if many monitoring events have to be writen. We believe that outliers result from a flush on the buffer of the writer. A more sophisticated writer to store data in the file system is the AsyncFsWriter. This does not introduce the outliers that result from flushing the writing buffer, since provides an asynchronous insertMonitoringData method. However, the AsyncFsWriter introduces a little more overhead because a writing queue is required and it isn't tested as much as the FileSystenWriter. The AsyncFsWriter should usually be used instead of this class to avoid the outliers described above.
Nested Class Summary | |
---|---|
static class |
MonitoringController.ControllerMode
|
Field Summary | |
---|---|
static AbstractMonitoringRecord |
END_OF_MONITORING_MARKER
|
static String |
WRITER_ASYNCDB
|
static String |
WRITER_ASYNCFS
|
static String |
WRITER_SYNCDB
|
static String |
WRITER_SYNCFS
|
Method Summary | |
---|---|
long |
currentTimeNanos()
Returns the timestamp for the current time. |
void |
disable()
Disables monitoring. |
void |
enable()
Enables monitoring. |
String |
getConnectorInfo()
Returns a human-readable information string about the controller configuration. |
String |
getDateString()
Returns a human-readable string with the current date and time. |
int |
getExperimentId()
|
static MonitoringController |
getInstance()
Returns the singleton instance. |
long |
getNumberOfInserts()
Shows how many inserts have been performed since last restart of the execution environment. |
String |
getVersion()
Return the version name of this controller instance. |
String |
getVmName()
The vmName which defaults to the hostname, and may be set by the control-servlet. |
int |
incExperimentId()
Increments the experiment ID by 1 and returns the new value. |
boolean |
isDebug()
|
boolean |
isMonitoringEnabled()
|
boolean |
isMonitoringPermanentlyTerminated()
|
boolean |
newMonitoringRecord(IMonitoringRecord record)
Passes the given monitoring record to the configured writer if the controller is enabled. |
void |
setControllerMode(MonitoringController.ControllerMode mode)
Enables or disables the replay mode (for monitoring the value should be false, i.e. the replay mode is disabled). |
void |
setDebug(boolean debug)
Sets the debug mode to the given parameter value. |
void |
setExperimentId(int newExperimentID)
|
void |
setVmname(String newVmname)
Allows to set an own vmName, a field in the monitoring data to distinguish multiple hosts / vms in a system. |
void |
terminate()
Permanently terminates monitoring (e.g., due to a failure). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final AbstractMonitoringRecord END_OF_MONITORING_MARKER
public static final String WRITER_SYNCDB
public static final String WRITER_ASYNCDB
public static final String WRITER_SYNCFS
public static final String WRITER_ASYNCFS
Method Detail |
---|
public static MonitoringController getInstance()
public final String getVmName()
public final void setVmname(String newVmname)
newVmname
- public final boolean isDebug()
public long getNumberOfInserts()
public final boolean isMonitoringEnabled()
public final boolean isMonitoringPermanentlyTerminated()
public final int getExperimentId()
public int incExperimentId()
public void setExperimentId(int newExperimentID)
public final void enable()
IllegalStateException
- if controller has been terminated prior to callpublic final void disable()
IllegalStateException
- if controller has been terminated prior to callpublic final void terminate()
public final void setControllerMode(MonitoringController.ControllerMode mode)
replayMode
- public final boolean newMonitoringRecord(IMonitoringRecord record)
newMonitoringRecord
in interface IMonitoringRecordReceiver
monitoringRecord
- the record to be logged
public final long currentTimeNanos()
public String getConnectorInfo()
public String getDateString()
public String getVersion()
public final void setDebug(boolean debug)
debug
- iff true, debug mode is enabled
|
Kieker 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |