Package com.saperion.util
Class StartupTimer
java.lang.Object
com.saperion.util.StartupTimer
A utility class intended to be used to monitor the startup behavior of a single process.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
finished()
Notifies this StartupTimer that the startup process was finished.static StartupTimer
void
Notifies this StartupTimer that a new action in the startup process has begun.void
Notifies this StartupTimer that the action identified by the id was finished.
-
Method Details
-
getInstance
- Returns:
- singleton instance
-
start
Notifies this StartupTimer that a new action in the startup process has begun.- Parameters:
id
- id of the action. Must be used whenstop(String)
is calleddescription
- a human-readable description of the action that has begun
-
stop
Notifies this StartupTimer that the action identified by the id was finished.- Parameters:
id
- id of the action as used instart(String, String)
-
finished
public void finished()Notifies this StartupTimer that the startup process was finished. If info-logging is enabled, the recorded times will be logged. Additionally, a newStartupTimerMBean
will be registered. All actions, that were not yet stopped by callingstop(String)
, will be stopped. After this method was called, further calls tostart(String, String)
orstop(String)
will have no effect.
-