public interface StatisticsMonitor
Components will allow to get their respective statistics without being monitoring (while caching the calls for the provided statistics interval).
Monitoring statistics is only required when wanting to receive statistics change events.
The statistics interval controls either for how long the latest statistics call will be cached, or, when monitoring is enabled, the interval the statistics will be pooled. Its default value is 5 seconds.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HISTORY_SIZE
The default history size stored in statistics.
|
static long |
DEFAULT_MONITOR_INTERVAL
The default statistics interval which is 5 seconds.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isMonitoring()
Returns
true if statistics are now being monitored. |
void |
setStatisticsHistorySize(int historySize)
Sets the history size of number of statistics stored.
|
void |
setStatisticsInterval(long interval,
TimeUnit timeUnit)
Sets the statistics interval, automatically updating the monitoring scheduled tasks if
monitoring is enabled.
|
void |
startStatisticsMonitor()
Starts the statistics monitor, starting a scheduled monitor that polls for statistics.
|
void |
stopStatisticsMonitor()
Stops the statistics monitor.
|
static final long DEFAULT_MONITOR_INTERVAL
static final int DEFAULT_HISTORY_SIZE
void setStatisticsInterval(long interval, TimeUnit timeUnit)
void setStatisticsHistorySize(int historySize)
void startStatisticsMonitor()
void stopStatisticsMonitor()
boolean isMonitoring()
true
if statistics are now being monitored.Copyright © GigaSpaces.