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 |
getStatistics()
Returns the statistics of the operating system.
|
OperatingSystemStatisticsChangedEventManager |
getStatisticsChanged()
Allows to register for
OperatingSystemStatisticsChangedEventListener s. |
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()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public void addOperatingSystemInfoProvider(InternalOperatingSystemInfoProvider provider)
addOperatingSystemInfoProvider
in interface InternalOperatingSystem
public void removeOperatingSystemInfoProvider(InternalOperatingSystemInfoProvider provider)
removeOperatingSystemInfoProvider
in interface InternalOperatingSystem
public boolean hasOperatingSystemInfoProviders()
hasOperatingSystemInfoProviders
in interface InternalOperatingSystem
public String getUid()
OperatingSystem
getUid
in interface OperatingSystem
public long getTimeDelta()
OperatingSystem
getTimeDelta
in interface OperatingSystem
public long getCurrentTimeInMillis()
OperatingSystem
getCurrentTimeInMillis
in interface OperatingSystem
public OperatingSystemDetails getDetails()
OperatingSystem
getDetails
in interface OperatingSystem
public OperatingSystemStatistics getStatistics()
OperatingSystem
getStatistics
in interface OperatingSystem
public void setStatisticsInterval(long interval, TimeUnit timeUnit)
StatisticsMonitor
setStatisticsInterval
in interface StatisticsMonitor
public void setStatisticsHistorySize(int historySize)
StatisticsMonitor
setStatisticsHistorySize
in interface StatisticsMonitor
public void startStatisticsMonitor()
StatisticsMonitor
startStatisticsMonitor
in interface StatisticsMonitor
public void stopStatisticsMonitor()
StatisticsMonitor
stopStatisticsMonitor
in interface StatisticsMonitor
public boolean isMonitoring()
StatisticsMonitor
true
if statistics are now being monitored.isMonitoring
in interface StatisticsMonitor
public OperatingSystemStatisticsChangedEventManager getStatisticsChanged()
OperatingSystem
OperatingSystemStatisticsChangedEventListener
s.
Note, in order to receive events, the StatisticsMonitor.startStatisticsMonitor()
needs to be
called.
getStatisticsChanged
in interface OperatingSystem
Copyright © GigaSpaces.