public interface VirtualMachines extends AdminAware, Iterable<VirtualMachine>, StatisticsMonitor
VirtualMachine
s 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.
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
Modifier and Type | Method and Description |
---|---|
void |
addLifecycleListener(VirtualMachineLifecycleEventListener eventListener)
Allows to add a
VirtualMachineLifecycleEventListener . |
VirtualMachinesDetails |
getDetails()
Returns the aggregated details of all virtual machines.
|
int |
getSize()
Returns the number of virtual machines current discovered.
|
VirtualMachinesStatistics |
getStatistics()
Returns the aggregated statistics of all virtual machines.
|
VirtualMachinesStatisticsChangedEventManager |
getStatisticsChanged()
Returns a virtual machines statistics change event manager allowing to register for events of
VirtualMachinesStatisticsChangedEvent . |
Map<String,VirtualMachine> |
getUids()
Returns a map of virtual machines with the key as the uid.
|
VirtualMachineAddedEventManager |
getVirtualMachineAdded()
Returns the virtual machine added event manager allowing to add and remove
VirtualMachineAddedEventListener s. |
VirtualMachine |
getVirtualMachineByUID(String uid)
Return a virtual machine by its uid.
|
VirtualMachineRemovedEventManager |
getVirtualMachineRemoved()
Returns the virtual machine removed event manager allowing to add and remove
VirtualMachineRemovedEventListener s. |
VirtualMachine[] |
getVirtualMachines()
Returns the currently discovered virtual machines.
|
VirtualMachineStatisticsChangedEventManager |
getVirtualMachineStatisticsChanged()
Returns a virtual machine statistics change event manger allowing to register for events of
VirtualMachineStatisticsChangedEvent . |
boolean |
isEmpty()
Returns
true if there are no virtual machines, false otherwise. |
void |
removeLifecycleListener(VirtualMachineLifecycleEventListener eventListener)
Allows to remove a
VirtualMachineLifecycleEventListener . |
getAdmin
forEach, iterator, spliterator
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitor
VirtualMachine[] getVirtualMachines()
VirtualMachinesDetails getDetails()
VirtualMachinesStatistics getStatistics()
VirtualMachine getVirtualMachineByUID(String uid)
Map<String,VirtualMachine> getUids()
int getSize()
boolean isEmpty()
true
if there are no virtual machines, false
otherwise.VirtualMachineAddedEventManager getVirtualMachineAdded()
VirtualMachineAddedEventListener
s.VirtualMachineRemovedEventManager getVirtualMachineRemoved()
VirtualMachineRemovedEventListener
s.void addLifecycleListener(VirtualMachineLifecycleEventListener eventListener)
VirtualMachineLifecycleEventListener
.void removeLifecycleListener(VirtualMachineLifecycleEventListener eventListener)
VirtualMachineLifecycleEventListener
.VirtualMachinesStatisticsChangedEventManager getStatisticsChanged()
VirtualMachinesStatisticsChangedEvent
.
Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
VirtualMachineStatisticsChangedEventManager getVirtualMachineStatisticsChanged()
VirtualMachineStatisticsChangedEvent
.
Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
Copyright © GigaSpaces.