Package org.openspaces.admin.internal.vm
Class DefaultVirtualMachines
java.lang.Object
org.openspaces.admin.internal.vm.DefaultVirtualMachines
- All Implemented Interfaces:
Iterable<VirtualMachine>,AdminAware,InternalVirtualMachines,StatisticsMonitor,VirtualMachines
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(VirtualMachineLifecycleEventListener eventListener) Allows to add aVirtualMachineLifecycleEventListener.voidaddVirtualMachine(VirtualMachine virtualMachine) getAdmin()Returns theAdminassociated with this element.Returns the aggregated details of all virtual machines.intgetSize()Returns the number of virtual machines current discovered.Returns the aggregated statistics of all virtual machines.Returns a virtual machines statistics change event manager allowing to register for events ofVirtualMachinesStatisticsChangedEvent.getUids()Returns a map of virtual machines with the key as the uid.Returns the virtual machine added event manager allowing to add and removeVirtualMachineAddedEventListeners.Return a virtual machine by its uid.Returns the virtual machine removed event manager allowing to add and removeVirtualMachineRemovedEventListeners.Returns the currently discovered virtual machines.Returns a virtual machine statistics change event manger allowing to register for events ofVirtualMachineStatisticsChangedEvent.booleanisEmpty()Returnstrueif there are no virtual machines,falseotherwise.booleanReturnstrueif statistics are now being monitored.iterator()voidremoveLifecycleListener(VirtualMachineLifecycleEventListener eventListener) Allows to remove aVirtualMachineLifecycleEventListener.voidsetStatisticsHistorySize(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultVirtualMachines
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
getVirtualMachineAdded
Description copied from interface:VirtualMachinesReturns the virtual machine added event manager allowing to add and removeVirtualMachineAddedEventListeners.- Specified by:
getVirtualMachineAddedin interfaceVirtualMachines
-
getVirtualMachineRemoved
Description copied from interface:VirtualMachinesReturns the virtual machine removed event manager allowing to add and removeVirtualMachineRemovedEventListeners.- Specified by:
getVirtualMachineRemovedin interfaceVirtualMachines
-
getVirtualMachineStatisticsChanged
Description copied from interface:VirtualMachinesReturns a virtual machine statistics change event manger allowing to register for events ofVirtualMachineStatisticsChangedEvent.Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
- Specified by:
getVirtualMachineStatisticsChangedin interfaceVirtualMachines
-
getStatisticsChanged
Description copied from interface:VirtualMachinesReturns a virtual machines statistics change event manager allowing to register for events ofVirtualMachinesStatisticsChangedEvent.Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
- Specified by:
getStatisticsChangedin interfaceVirtualMachines
-
getVirtualMachines
Description copied from interface:VirtualMachinesReturns the currently discovered virtual machines.- Specified by:
getVirtualMachinesin interfaceVirtualMachines
-
iterator
- Specified by:
iteratorin interfaceIterable<VirtualMachine>
-
getSize
public int getSize()Description copied from interface:VirtualMachinesReturns the number of virtual machines current discovered.- Specified by:
getSizein interfaceVirtualMachines
-
isEmpty
public boolean isEmpty()Description copied from interface:VirtualMachinesReturnstrueif there are no virtual machines,falseotherwise.- Specified by:
isEmptyin interfaceVirtualMachines
-
getStatistics
Description copied from interface:VirtualMachinesReturns the aggregated statistics of all virtual machines.- Specified by:
getStatisticsin interfaceVirtualMachines
-
getDetails
Description copied from interface:VirtualMachinesReturns the aggregated details of all virtual machines.- Specified by:
getDetailsin interfaceVirtualMachines
-
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
-
addLifecycleListener
Description copied from interface:VirtualMachinesAllows to add aVirtualMachineLifecycleEventListener.- Specified by:
addLifecycleListenerin interfaceVirtualMachines
-
removeLifecycleListener
Description copied from interface:VirtualMachinesAllows to remove aVirtualMachineLifecycleEventListener.- Specified by:
removeLifecycleListenerin interfaceVirtualMachines
-
getVirtualMachineByUID
Description copied from interface:VirtualMachinesReturn a virtual machine by its uid.- Specified by:
getVirtualMachineByUIDin interfaceVirtualMachines
-
getUids
Description copied from interface:VirtualMachinesReturns a map of virtual machines with the key as the uid.- Specified by:
getUidsin interfaceVirtualMachines
-
addVirtualMachine
- Specified by:
addVirtualMachinein interfaceInternalVirtualMachines
-
removeVirtualMachine
- Specified by:
removeVirtualMachinein interfaceInternalVirtualMachines
-