Package org.openspaces.admin.internal.vm
Class DefaultVirtualMachine
java.lang.Object
org.openspaces.admin.internal.vm.DefaultVirtualMachine
- All Implemented Interfaces:
InternalMachineAware,InternalVirtualMachine,MachineAware,StatisticsMonitor,VirtualMachine
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionDefaultVirtualMachine(InternalVirtualMachines virtualMachines, JVMDetails details, String jmxUrl) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(SpaceInstanceLifecycleEventListener eventListener) Adds anSpaceInstanceLifecycleEventListenerallowing to be notified when a space instance was added or removed from this virtual machine.voidaddProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) voidaddProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener) Adds anProcessingUnitInstanceLifecycleEventListenerallowing to be notified when a processing unit instance was added or removed from this virtual machine.voidaddSpaceInstance(SpaceInstance spaceInstance) voidaddVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider) booleanReturns the details (non changeable information) of the virtual machine.Returns the grid service agent started within this virtual machine.Returns the grid service container started within this virtual machine.Returns the grid service manager started within this virtual machine.Returns the lookup services that are running on the machine.Returns the machine the component is running on.Returns an event manager allowing to registerProcessingUnitInstanceAddedEventListeners for processing unit instances added on this virtual machine.Returns an event manager allowing to registerProcessingUnitRemovedEventListeners for processing unit instances removed on this virtual machine.Returns the processing unit instances started within this virtual machine.Returns an event manager allowing to register forSpaceInstanceAddedEventListeners for space instances added on this virtual machine.Returns an event manager allowing to register forSpaceInstanceRemovedEventListeners for space instances added on this virtual machine.Returns the space instances started within this virtual machine.Returns the statistics of the virtual machine.getUid()Returns the uid of the virtual machine.Returns an event manager allowing to register forVirtualMachineStatisticsChangedEvents.inthashCode()booleanbooleanReturnstrueif statistics are now being monitored.voidremoveLifecycleListener(SpaceInstanceLifecycleEventListener eventListener) Removes anSpaceInstanceLifecycleEventListenerallowing to be notified when a space instance was added or removed from this virtual machine.voidvoidremoveProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener) Removes anProcessingUnitInstanceLifecycleEventListenerallowing to be notified when a processing unit instance was added or removed from this virtual machine.voidvoidremoveVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider) voidrunGc()Runs GC on the virtual machine.voidsetLogLevel(String loggerName, String level) set the log level of the virtual machinevoidsetMachine(Machine machine) 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.
-
Constructor Details
-
DefaultVirtualMachine
public DefaultVirtualMachine(InternalVirtualMachines virtualMachines, JVMDetails details, String jmxUrl)
-
-
Method Details
-
getUid
Description copied from interface:VirtualMachineReturns the uid of the virtual machine.- Specified by:
getUidin interfaceVirtualMachine
-
addVirtualMachineInfoProvider
public void addVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider) - Specified by:
addVirtualMachineInfoProviderin interfaceInternalVirtualMachine
-
removeVirtualMachineInfoProvider
public void removeVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider) - Specified by:
removeVirtualMachineInfoProviderin interfaceInternalVirtualMachine
-
hasVirtualMachineInfoProviders
public boolean hasVirtualMachineInfoProviders()- Specified by:
hasVirtualMachineInfoProvidersin interfaceInternalVirtualMachine
-
getVirtualMachineStatisticsChanged
Description copied from interface:VirtualMachineReturns an event manager allowing to register forVirtualMachineStatisticsChangedEvents.Note, the events will be raised only when the
StatisticsMonitor.startStatisticsMonitor()is called.- Specified by:
getVirtualMachineStatisticsChangedin interfaceVirtualMachine
-
getDetails
Description copied from interface:VirtualMachineReturns the details (non changeable information) of the virtual machine.- Specified by:
getDetailsin interfaceVirtualMachine
-
getMachine
Description copied from interface:MachineAwareReturns the machine the component is running on.- Specified by:
getMachinein interfaceMachineAware
-
setMachine
- Specified by:
setMachinein interfaceInternalMachineAware
-
setLogLevel
Description copied from interface:VirtualMachineset the log level of the virtual machine- Specified by:
setLogLevelin interfaceVirtualMachine
-
getLookupService
Description copied from interface:VirtualMachineReturns the lookup services that are running on the machine. Returnsnullif no lookup service was started within it.- Specified by:
getLookupServicein interfaceVirtualMachine
-
getLookupServices
- Specified by:
getLookupServicesin interfaceInternalVirtualMachine
-
getGridServiceAgents
- Specified by:
getGridServiceAgentsin interfaceInternalVirtualMachine
-
getGridServiceAgent
Description copied from interface:VirtualMachineReturns the grid service agent started within this virtual machine. Returnsnullif no grid service agent was started within it.- Specified by:
getGridServiceAgentin interfaceVirtualMachine
-
getGridServiceManager
Description copied from interface:VirtualMachineReturns the grid service manager started within this virtual machine. Returnsnullif no grid service manager was started within it.- Specified by:
getGridServiceManagerin interfaceVirtualMachine
-
getGridServiceContainer
Description copied from interface:VirtualMachineReturns the grid service container started within this virtual machine. Returnsnullif no grid service manager was started within it.- Specified by:
getGridServiceContainerin interfaceVirtualMachine
-
getGridServiceManagers
- Specified by:
getGridServiceManagersin interfaceInternalVirtualMachine
-
getGridServiceContainers
- Specified by:
getGridServiceContainersin interfaceInternalVirtualMachine
-
getLastStatistics
- Specified by:
getLastStatisticsin interfaceInternalVirtualMachine
-
getProcessingUnitInstances
Description copied from interface:VirtualMachineReturns the processing unit instances started within this virtual machine.- Specified by:
getProcessingUnitInstancesin interfaceVirtualMachine
-
getProcessingUnitInstanceAdded
Description copied from interface:VirtualMachineReturns an event manager allowing to registerProcessingUnitInstanceAddedEventListeners for processing unit instances added on this virtual machine.- Specified by:
getProcessingUnitInstanceAddedin interfaceVirtualMachine
-
getProcessingUnitInstanceRemoved
Description copied from interface:VirtualMachineReturns an event manager allowing to registerProcessingUnitRemovedEventListeners for processing unit instances removed on this virtual machine.- Specified by:
getProcessingUnitInstanceRemovedin interfaceVirtualMachine
-
addProcessingUnitInstanceLifecycleEventListener
public void addProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener) Description copied from interface:VirtualMachineAdds anProcessingUnitInstanceLifecycleEventListenerallowing to be notified when a processing unit instance was added or removed from this virtual machine.- Specified by:
addProcessingUnitInstanceLifecycleEventListenerin interfaceVirtualMachine
-
removeProcessingUnitInstanceLifecycleEventListener
public void removeProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener) Description copied from interface:VirtualMachineRemoves anProcessingUnitInstanceLifecycleEventListenerallowing to be notified when a processing unit instance was added or removed from this virtual machine.- Specified by:
removeProcessingUnitInstanceLifecycleEventListenerin interfaceVirtualMachine
-
getSpaceInstances
Description copied from interface:VirtualMachineReturns the space instances started within this virtual machine.- Specified by:
getSpaceInstancesin interfaceVirtualMachine
-
getSpaceInstanceAdded
Description copied from interface:VirtualMachineReturns an event manager allowing to register forSpaceInstanceAddedEventListeners for space instances added on this virtual machine.- Specified by:
getSpaceInstanceAddedin interfaceVirtualMachine
-
getSpaceInstanceRemoved
Description copied from interface:VirtualMachineReturns an event manager allowing to register forSpaceInstanceRemovedEventListeners for space instances added on this virtual machine.- Specified by:
getSpaceInstanceRemovedin interfaceVirtualMachine
-
addLifecycleListener
Description copied from interface:VirtualMachineAdds anSpaceInstanceLifecycleEventListenerallowing to be notified when a space instance was added or removed from this virtual machine.- Specified by:
addLifecycleListenerin interfaceVirtualMachine
-
removeLifecycleListener
Description copied from interface:VirtualMachineRemoves anSpaceInstanceLifecycleEventListenerallowing to be notified when a space instance was added or removed from this virtual machine.- Specified by:
removeLifecycleListenerin interfaceVirtualMachine
-
addProcessingUnitInstance
- Specified by:
addProcessingUnitInstancein interfaceInternalVirtualMachine
-
removeProcessingUnitInstance
- Specified by:
removeProcessingUnitInstancein interfaceInternalVirtualMachine
-
addSpaceInstance
- Specified by:
addSpaceInstancein interfaceInternalVirtualMachine
-
removeSpaceInstance
- Specified by:
removeSpaceInstancein interfaceInternalVirtualMachine
-
runGc
public void runGc()Description copied from interface:VirtualMachineRuns GC on the virtual machine.- Specified by:
runGcin interfaceVirtualMachine
-
getStatistics
Description copied from interface:VirtualMachineReturns the statistics of the virtual machine.- Specified by:
getStatisticsin interfaceVirtualMachine
-
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
-
equals
-
hashCode
public int hashCode()
-