Package org.openspaces.admin.internal.os
Class DefaultOperatingSystem
java.lang.Object
org.openspaces.admin.internal.os.DefaultOperatingSystem
- All Implemented Interfaces:
AdminAware,InternalOperatingSystem,OperatingSystem,StatisticsMonitor
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOperatingSystem(OSDetails osDetails, InternalOperatingSystems operatingSystems) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleangetAdmin()Returns theAdminassociated with this element.longReturns the current time of the machine in millis.Returns details (static view) of the operating system.Returns the statistics of the operating system.Allows to register forOperatingSystemStatisticsChangedEventListeners.longReturns the delta between a current time taken on the admin API side, and the current time assumed by the remote machine.getUid()Returns the uid of the operating system.inthashCode()booleanbooleanReturnstrueif statistics are now being monitored.voidvoidsetStatisticsHistorySize(int historySize) Sets the history size of number of statistics stored.voidsetStatisticsInterval(long interval, TimeUnit timeUnit) Sets the statistics interval, automatically updating the monitoring scheduled tasks if monitoring is enabled.voidStarts the statistics monitor, starting a scheduled monitor that polls for statistics.voidStops the statistics monitor.
-
Constructor Details
-
DefaultOperatingSystem
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
addOperatingSystemInfoProvider
- Specified by:
addOperatingSystemInfoProviderin interfaceInternalOperatingSystem
-
removeOperatingSystemInfoProvider
- Specified by:
removeOperatingSystemInfoProviderin interfaceInternalOperatingSystem
-
hasOperatingSystemInfoProviders
public boolean hasOperatingSystemInfoProviders()- Specified by:
hasOperatingSystemInfoProvidersin interfaceInternalOperatingSystem
-
getLastStatistics
- Specified by:
getLastStatisticsin interfaceInternalOperatingSystem
-
getUid
Description copied from interface:OperatingSystemReturns the uid of the operating system.- Specified by:
getUidin interfaceOperatingSystem
-
getTimeDelta
public long getTimeDelta()Description copied from interface:OperatingSystemReturns the delta between a current time taken on the admin API side, and the current time assumed by the remote machine.- Specified by:
getTimeDeltain interfaceOperatingSystem
-
getCurrentTimeInMillis
public long getCurrentTimeInMillis()Description copied from interface:OperatingSystemReturns the current time of the machine in millis.- Specified by:
getCurrentTimeInMillisin interfaceOperatingSystem
-
getDetails
Description copied from interface:OperatingSystemReturns details (static view) of the operating system.- Specified by:
getDetailsin interfaceOperatingSystem
-
getStatistics
Description copied from interface:OperatingSystemReturns the statistics of the operating system.- Specified by:
getStatisticsin interfaceOperatingSystem
-
setStatisticsInterval
Description copied from interface:StatisticsMonitorSets the statistics interval, automatically updating the monitoring scheduled tasks if monitoring is enabled.- Specified by:
setStatisticsIntervalin interfaceStatisticsMonitor
-
setStatisticsHistorySize
public void setStatisticsHistorySize(int historySize) Description copied from interface:StatisticsMonitorSets the history size of number of statistics stored.- Specified by:
setStatisticsHistorySizein interfaceStatisticsMonitor
-
startStatisticsMonitor
public void startStatisticsMonitor()Description copied from interface:StatisticsMonitorStarts the statistics monitor, starting a scheduled monitor that polls for statistics. Monitoring is required only when wanting to receive statistics change events.- Specified by:
startStatisticsMonitorin interfaceStatisticsMonitor
-
stopStatisticsMonitor
public void stopStatisticsMonitor()Description copied from interface:StatisticsMonitorStops the statistics monitor.- Specified by:
stopStatisticsMonitorin interfaceStatisticsMonitor
-
isMonitoring
public boolean isMonitoring()Description copied from interface:StatisticsMonitorReturnstrueif statistics are now being monitored.- Specified by:
isMonitoringin interfaceStatisticsMonitor
-
getStatisticsChanged
Description copied from interface:OperatingSystemAllows to register forOperatingSystemStatisticsChangedEventListeners.Note, in order to receive events, the
StatisticsMonitor.startStatisticsMonitor()needs to be called.- Specified by:
getStatisticsChangedin interfaceOperatingSystem
-
equals
-
hashCode
public int hashCode()
-