Package org.openspaces.admin.vm
Interface VirtualMachines
- All Superinterfaces:
AdminAware,Iterable<VirtualMachine>,StatisticsMonitor
- All Known Subinterfaces:
InternalVirtualMachines
- All Known Implementing Classes:
DefaultVirtualMachines
Virtual Machines hold all the different
VirtualMachines that are currently discovered.
Provides simple means to get all the current virtual machines, as well as as registering for virtual machine lifecycle (added and removed) events.
Provides the ability to start a statistics monitor on all current virtual machines using
StatisticsMonitor.startStatisticsMonitor(). Newly discovered virtual machines will automatically use the
statistics monitor as well.
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(VirtualMachineLifecycleEventListener eventListener) Allows to add aVirtualMachineLifecycleEventListener.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.voidremoveLifecycleListener(VirtualMachineLifecycleEventListener eventListener) Allows to remove aVirtualMachineLifecycleEventListener.Methods inherited from interface org.openspaces.admin.AdminAware
getAdminMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.openspaces.admin.StatisticsMonitor
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitor
-
Method Details
-
getVirtualMachines
VirtualMachine[] getVirtualMachines()Returns the currently discovered virtual machines. -
getDetails
VirtualMachinesDetails getDetails()Returns the aggregated details of all virtual machines. -
getStatistics
VirtualMachinesStatistics getStatistics()Returns the aggregated statistics of all virtual machines. -
getVirtualMachineByUID
Return a virtual machine by its uid. -
getUids
Map<String,VirtualMachine> getUids()Returns a map of virtual machines with the key as the uid. -
getSize
int getSize()Returns the number of virtual machines current discovered. -
isEmpty
boolean isEmpty()Returnstrueif there are no virtual machines,falseotherwise. -
getVirtualMachineAdded
VirtualMachineAddedEventManager getVirtualMachineAdded()Returns the virtual machine added event manager allowing to add and removeVirtualMachineAddedEventListeners. -
getVirtualMachineRemoved
VirtualMachineRemovedEventManager getVirtualMachineRemoved()Returns the virtual machine removed event manager allowing to add and removeVirtualMachineRemovedEventListeners. -
addLifecycleListener
Allows to add aVirtualMachineLifecycleEventListener. -
removeLifecycleListener
Allows to remove aVirtualMachineLifecycleEventListener. -
getStatisticsChanged
VirtualMachinesStatisticsChangedEventManager getStatisticsChanged()Returns 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.
-
getVirtualMachineStatisticsChanged
VirtualMachineStatisticsChangedEventManager getVirtualMachineStatisticsChanged()Returns 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.
-