public class DefaultVirtualMachine extends Object implements InternalVirtualMachine
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
Constructor and Description |
---|
DefaultVirtualMachine(InternalVirtualMachines virtualMachines,
JVMDetails details,
String jmxUrl) |
Modifier and Type | Method and Description |
---|---|
void |
addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
Adds an
SpaceInstanceLifecycleEventListener allowing to be notified when a space
instance was added or removed from this virtual machine. |
void |
addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) |
void |
addProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Adds an
ProcessingUnitInstanceLifecycleEventListener allowing to be notified when a
processing unit instance was added or removed from this virtual machine. |
void |
addSpaceInstance(SpaceInstance spaceInstance) |
void |
addVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider) |
boolean |
equals(Object o) |
VirtualMachineDetails |
getDetails()
Returns the details (non changeable information) of the virtual machine.
|
ElasticServiceManager |
getElasticServiceManager()
Returns the elastic service manager started within this virtual machine.
|
ElasticServiceManagers |
getElasticServiceManagers() |
GridServiceAgent |
getGridServiceAgent()
Returns the grid service agent started within this virtual machine.
|
GridServiceAgents |
getGridServiceAgents() |
GridServiceContainer |
getGridServiceContainer()
Returns the grid service container started within this virtual machine.
|
GridServiceContainers |
getGridServiceContainers() |
GridServiceManager |
getGridServiceManager()
Returns the grid service manager started within this virtual machine.
|
GridServiceManagers |
getGridServiceManagers() |
VirtualMachineStatistics |
getLastStatistics() |
LookupService |
getLookupService()
Returns the lookup services that are running on the machine.
|
LookupServices |
getLookupServices() |
Machine |
getMachine()
Returns the machine the component is running on.
|
ProcessingUnitInstanceAddedEventManager |
getProcessingUnitInstanceAdded()
Returns an event manager allowing to register
ProcessingUnitInstanceAddedEventListener s
for processing unit instances added on this virtual machine. |
ProcessingUnitInstanceRemovedEventManager |
getProcessingUnitInstanceRemoved()
Returns an event manager allowing to register
ProcessingUnitRemovedEventListener s
for processing unit instances removed on this virtual machine. |
ProcessingUnitInstance[] |
getProcessingUnitInstances()
Returns the processing unit instances started within this virtual machine.
|
SpaceInstanceAddedEventManager |
getSpaceInstanceAdded()
Returns an event manager allowing to register for
SpaceInstanceAddedEventListener s
for space instances added on this virtual machine. |
SpaceInstanceRemovedEventManager |
getSpaceInstanceRemoved()
Returns an event manager allowing to register for
SpaceInstanceRemovedEventListener s
for space instances added on this virtual machine. |
SpaceInstance[] |
getSpaceInstances()
Returns the space instances started within this virtual machine.
|
VirtualMachineStatistics |
getStatistics()
Returns the statistics of the virtual machine.
|
String |
getUid()
Returns the uid of the virtual machine.
|
VirtualMachineStatisticsChangedEventManager |
getVirtualMachineStatisticsChanged()
Returns an event manager allowing to register for
VirtualMachineStatisticsChangedEvent s. |
int |
hashCode() |
boolean |
hasVirtualMachineInfoProviders() |
boolean |
isMonitoring()
Returns
true if statistics are now being monitored. |
void |
removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
Removes an
SpaceInstanceLifecycleEventListener allowing to be notified when a space
instance was added or removed from this virtual machine. |
void |
removeProcessingUnitInstance(String uid) |
void |
removeProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Removes an
ProcessingUnitInstanceLifecycleEventListener allowing to be notified when
a processing unit instance was added or removed from this virtual machine. |
void |
removeSpaceInstance(String uid) |
void |
removeVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider) |
void |
runGc()
Runs GC on the virtual machine.
|
void |
setLogLevel(String loggerName,
String level)
set the log level of the virtual machine
|
void |
setMachine(Machine machine) |
void |
setStatisticsHistorySize(int historySize)
Sets the history size of number of statistics stored.
|
void |
setStatisticsInterval(long interval,
TimeUnit timeUnit)
Sets the statistics interval, automatically updating the monitoring scheduled tasks if
monitoring is enabled.
|
void |
startStatisticsMonitor()
Starts the statistics monitor, starting a scheduled monitor that polls for statistics.
|
void |
stopStatisticsMonitor()
Stops the statistics monitor.
|
public DefaultVirtualMachine(InternalVirtualMachines virtualMachines, JVMDetails details, String jmxUrl)
public String getUid()
VirtualMachine
getUid
in interface VirtualMachine
public void addVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider)
addVirtualMachineInfoProvider
in interface InternalVirtualMachine
public void removeVirtualMachineInfoProvider(InternalVirtualMachineInfoProvider virtualMachineInfoProvider)
removeVirtualMachineInfoProvider
in interface InternalVirtualMachine
public boolean hasVirtualMachineInfoProviders()
hasVirtualMachineInfoProviders
in interface InternalVirtualMachine
public VirtualMachineStatisticsChangedEventManager getVirtualMachineStatisticsChanged()
VirtualMachine
VirtualMachineStatisticsChangedEvent
s.
Note, the events will be raised only when the StatisticsMonitor.startStatisticsMonitor()
is
called.
getVirtualMachineStatisticsChanged
in interface VirtualMachine
public VirtualMachineDetails getDetails()
VirtualMachine
getDetails
in interface VirtualMachine
public Machine getMachine()
MachineAware
getMachine
in interface MachineAware
public void setMachine(Machine machine)
setMachine
in interface InternalMachineAware
public void setLogLevel(String loggerName, String level)
VirtualMachine
setLogLevel
in interface VirtualMachine
public LookupService getLookupService()
VirtualMachine
null
if no
lookup service was started within it.getLookupService
in interface VirtualMachine
public LookupServices getLookupServices()
getLookupServices
in interface InternalVirtualMachine
public GridServiceAgents getGridServiceAgents()
getGridServiceAgents
in interface InternalVirtualMachine
public GridServiceAgent getGridServiceAgent()
VirtualMachine
null
if no grid service agent was started within it.getGridServiceAgent
in interface VirtualMachine
public GridServiceManager getGridServiceManager()
VirtualMachine
null
if no grid service manager was started within it.getGridServiceManager
in interface VirtualMachine
public ElasticServiceManager getElasticServiceManager()
VirtualMachine
null
if no elastic service manager was started within it.getElasticServiceManager
in interface VirtualMachine
public GridServiceContainer getGridServiceContainer()
VirtualMachine
null
if no grid service manager was started within it.getGridServiceContainer
in interface VirtualMachine
public GridServiceManagers getGridServiceManagers()
getGridServiceManagers
in interface InternalVirtualMachine
public ElasticServiceManagers getElasticServiceManagers()
getElasticServiceManagers
in interface InternalVirtualMachine
public GridServiceContainers getGridServiceContainers()
getGridServiceContainers
in interface InternalVirtualMachine
public VirtualMachineStatistics getLastStatistics()
getLastStatistics
in interface InternalVirtualMachine
public ProcessingUnitInstance[] getProcessingUnitInstances()
VirtualMachine
getProcessingUnitInstances
in interface VirtualMachine
public ProcessingUnitInstanceAddedEventManager getProcessingUnitInstanceAdded()
VirtualMachine
ProcessingUnitInstanceAddedEventListener
s
for processing unit instances added on this virtual machine.getProcessingUnitInstanceAdded
in interface VirtualMachine
public ProcessingUnitInstanceRemovedEventManager getProcessingUnitInstanceRemoved()
VirtualMachine
ProcessingUnitRemovedEventListener
s
for processing unit instances removed on this virtual machine.getProcessingUnitInstanceRemoved
in interface VirtualMachine
public void addProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
VirtualMachine
ProcessingUnitInstanceLifecycleEventListener
allowing to be notified when a
processing unit instance was added or removed from this virtual machine.addProcessingUnitInstanceLifecycleEventListener
in interface VirtualMachine
public void removeProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
VirtualMachine
ProcessingUnitInstanceLifecycleEventListener
allowing to be notified when
a processing unit instance was added or removed from this virtual machine.removeProcessingUnitInstanceLifecycleEventListener
in interface VirtualMachine
public SpaceInstance[] getSpaceInstances()
VirtualMachine
getSpaceInstances
in interface VirtualMachine
public SpaceInstanceAddedEventManager getSpaceInstanceAdded()
VirtualMachine
SpaceInstanceAddedEventListener
s
for space instances added on this virtual machine.getSpaceInstanceAdded
in interface VirtualMachine
public SpaceInstanceRemovedEventManager getSpaceInstanceRemoved()
VirtualMachine
SpaceInstanceRemovedEventListener
s
for space instances added on this virtual machine.getSpaceInstanceRemoved
in interface VirtualMachine
public void addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
VirtualMachine
SpaceInstanceLifecycleEventListener
allowing to be notified when a space
instance was added or removed from this virtual machine.addLifecycleListener
in interface VirtualMachine
public void removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
VirtualMachine
SpaceInstanceLifecycleEventListener
allowing to be notified when a space
instance was added or removed from this virtual machine.removeLifecycleListener
in interface VirtualMachine
public void addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance)
addProcessingUnitInstance
in interface InternalVirtualMachine
public void removeProcessingUnitInstance(String uid)
removeProcessingUnitInstance
in interface InternalVirtualMachine
public void addSpaceInstance(SpaceInstance spaceInstance)
addSpaceInstance
in interface InternalVirtualMachine
public void removeSpaceInstance(String uid)
removeSpaceInstance
in interface InternalVirtualMachine
public void runGc()
VirtualMachine
runGc
in interface VirtualMachine
public VirtualMachineStatistics getStatistics()
VirtualMachine
getStatistics
in interface VirtualMachine
public void setStatisticsInterval(long interval, TimeUnit timeUnit)
StatisticsMonitor
setStatisticsInterval
in interface StatisticsMonitor
public void setStatisticsHistorySize(int historySize)
StatisticsMonitor
setStatisticsHistorySize
in interface StatisticsMonitor
public void startStatisticsMonitor()
StatisticsMonitor
startStatisticsMonitor
in interface StatisticsMonitor
public void stopStatisticsMonitor()
StatisticsMonitor
stopStatisticsMonitor
in interface StatisticsMonitor
public boolean isMonitoring()
StatisticsMonitor
true
if statistics are now being monitored.isMonitoring
in interface StatisticsMonitor
Copyright © GigaSpaces.