public class DefaultOperatingSystem extends Object implements InternalOperatingSystem
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL| Constructor and Description |
|---|
DefaultOperatingSystem(OSDetails osDetails,
InternalOperatingSystems operatingSystems) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOperatingSystemInfoProvider(InternalOperatingSystemInfoProvider provider) |
boolean |
equals(Object o) |
Admin |
getAdmin()
Returns the
Admin associated with this element. |
long |
getCurrentTimeInMillis()
Returns the current time of the machine in millis.
|
OperatingSystemDetails |
getDetails()
Returns details (static view) of the operating system.
|
OperatingSystemStatistics |
getLastStatistics() |
OperatingSystemStatistics |
getStatistics()
Returns the statistics of the operating system.
|
OperatingSystemStatisticsChangedEventManager |
getStatisticsChanged()
Allows to register for
OperatingSystemStatisticsChangedEventListeners. |
long |
getTimeDelta()
Returns the delta between a current time taken on the admin API side, and the current time
assumed by the remote machine.
|
String |
getUid()
Returns the uid of the operating system.
|
int |
hashCode() |
boolean |
hasOperatingSystemInfoProviders() |
boolean |
isMonitoring()
Returns
true if statistics are now being monitored. |
void |
removeOperatingSystemInfoProvider(InternalOperatingSystemInfoProvider provider) |
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.
|
public DefaultOperatingSystem(OSDetails osDetails, InternalOperatingSystems operatingSystems)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic void addOperatingSystemInfoProvider(InternalOperatingSystemInfoProvider provider)
addOperatingSystemInfoProvider in interface InternalOperatingSystempublic void removeOperatingSystemInfoProvider(InternalOperatingSystemInfoProvider provider)
removeOperatingSystemInfoProvider in interface InternalOperatingSystempublic boolean hasOperatingSystemInfoProviders()
hasOperatingSystemInfoProviders in interface InternalOperatingSystempublic OperatingSystemStatistics getLastStatistics()
getLastStatistics in interface InternalOperatingSystempublic String getUid()
OperatingSystemgetUid in interface OperatingSystempublic long getTimeDelta()
OperatingSystemgetTimeDelta in interface OperatingSystempublic long getCurrentTimeInMillis()
OperatingSystemgetCurrentTimeInMillis in interface OperatingSystempublic OperatingSystemDetails getDetails()
OperatingSystemgetDetails in interface OperatingSystempublic OperatingSystemStatistics getStatistics()
OperatingSystemgetStatistics in interface OperatingSystempublic void setStatisticsInterval(long interval,
TimeUnit timeUnit)
StatisticsMonitorsetStatisticsInterval in interface StatisticsMonitorpublic void setStatisticsHistorySize(int historySize)
StatisticsMonitorsetStatisticsHistorySize in interface StatisticsMonitorpublic void startStatisticsMonitor()
StatisticsMonitorstartStatisticsMonitor in interface StatisticsMonitorpublic void stopStatisticsMonitor()
StatisticsMonitorstopStatisticsMonitor in interface StatisticsMonitorpublic boolean isMonitoring()
StatisticsMonitortrue if statistics are now being monitored.isMonitoring in interface StatisticsMonitorpublic OperatingSystemStatisticsChangedEventManager getStatisticsChanged()
OperatingSystemOperatingSystemStatisticsChangedEventListeners.
Note, in order to receive events, the StatisticsMonitor.startStatisticsMonitor() needs to be
called.
getStatisticsChanged in interface OperatingSystemCopyright © GigaSpaces.