Class DefaultMachine
java.lang.Object
org.openspaces.admin.internal.machine.DefaultMachine
- All Implemented Interfaces:
DumpProvider,InternalMachine,InternalProcessingUnitInstancesAware,Machine
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAllows to add aProcessingUnitInstanceLifecycleEventListener.voidaddLifecycleListener(SpaceInstanceLifecycleEventListener eventListener) Allows to add aSpaceInstanceLifecycleEventListener.voidaddProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) voidaddSpaceInstance(SpaceInstance spaceInstance) booleancontains(ProcessingUnitInstance processingUnitInstance) Returnstrueif the processing unit instance exists within the machine.booleancontains(SpaceInstance spaceInstance) Returnstrueif the machine contains the provided space instance.booleangenerateDump(String cause, Map<String, Object> context) Generates dump for all the provided dump processors.Generates dump for the provided processors.Returns the first grid service agent.Returns the grid service agents running on the machine.Returns the grid service containers running on the machine.Returns the grid service managers running on the machine.Returns the host address of the machine.Returns the host name of the machine.Returns the lookup services that are running on the machine.Returns the operating system of the machine.Returns the processing unit instance added event manager allowing to add and removeProcessingUnitInstanceAddedEventListeners.Returns the processing unit instance removed event manager allowing to add and removeProcessingUnitInstanceRemovedEventListeners.Returns all the processing unit instances running on the machine.getProcessingUnitInstances(String processingUnitName) Returns the processing unit instances of the specified name that are currently deployed on the machine.Returns the space instance added event manager allowing to add and removeSpaceInstanceAddedEventListeners.Returns the space instance removed event manager allowing to add and removeSpaceInstanceRemovedEventListeners.Returns all the space instances running on the machine.Returns the transports "running" on the machine.getUid()Returns the UID of the machine.getVirtualMachineByPID(long pid) Return a virtual machine by its pid.Returns the virtual machines running on the machine.booleanReturnstrueif there are grid components.inthashCode()booleanvoidAllows to remove aProcessingUnitInstanceLifecycleEventListener.voidremoveLifecycleListener(SpaceInstanceLifecycleEventListener eventListener) Allows to remove aSpaceInstanceLifecycleEventListener.voidvoidvoidsetOperatingSystem(OperatingSystem operatingSystem)
-
Constructor Details
-
DefaultMachine
-
-
Method Details
-
getUid
Description copied from interface:MachineReturns the UID of the machine. -
getHostAddress
Description copied from interface:MachineReturns the host address of the machine.- Specified by:
getHostAddressin interfaceMachine
-
getHostName
Description copied from interface:MachineReturns the host name of the machine.- Specified by:
getHostNamein interfaceMachine
-
getGridServiceAgent
Description copied from interface:MachineReturns the first grid service agent. Note, there will usually be only a single agent per machine. Returnsnullif there is noGridServiceAgentrunning on the machine.- Specified by:
getGridServiceAgentin interfaceMachine
-
getGridServiceAgents
Description copied from interface:MachineReturns the grid service agents running on the machine.- Specified by:
getGridServiceAgentsin interfaceMachine
-
getLookupServices
Description copied from interface:MachineReturns the lookup services that are running on the machine.- Specified by:
getLookupServicesin interfaceMachine
-
getGridServiceManagers
Description copied from interface:MachineReturns the grid service managers running on the machine.- Specified by:
getGridServiceManagersin interfaceMachine
-
getGridServiceContainers
Description copied from interface:MachineReturns the grid service containers running on the machine.- Specified by:
getGridServiceContainersin interfaceMachine
-
hasGridComponents
public boolean hasGridComponents()Description copied from interface:MachineReturnstrueif there are grid components.- Specified by:
hasGridComponentsin interfaceMachine
-
getTransports
Description copied from interface:MachineReturns the transports "running" on the machine.- Specified by:
getTransportsin interfaceMachine
-
getProcessingUnits
- Specified by:
getProcessingUnitsin interfaceMachine- Returns:
- Returns the
ProcessingUnitof the processing unit instances running on the machine.
-
getVirtualMachineByPID
Description copied from interface:MachineReturn a virtual machine by its pid.- Specified by:
getVirtualMachineByPIDin interfaceMachine
-
setOperatingSystem
- Specified by:
setOperatingSystemin interfaceInternalMachine
-
hasOperatingSystem
public boolean hasOperatingSystem() -
getOperatingSystem
Description copied from interface:MachineReturns the operating system of the machine.- Specified by:
getOperatingSystemin interfaceMachine
-
getVirtualMachines
Description copied from interface:MachineReturns the virtual machines running on the machine.- Specified by:
getVirtualMachinesin interfaceMachine
-
getProcessingUnitInstanceAdded
Description copied from interface:MachineReturns the processing unit instance added event manager allowing to add and removeProcessingUnitInstanceAddedEventListeners.- Specified by:
getProcessingUnitInstanceAddedin interfaceMachine
-
getProcessingUnitInstanceRemoved
Description copied from interface:MachineReturns the processing unit instance removed event manager allowing to add and removeProcessingUnitInstanceRemovedEventListeners.- Specified by:
getProcessingUnitInstanceRemovedin interfaceMachine
-
addLifecycleEventListener
Description copied from interface:MachineAllows to add aProcessingUnitInstanceLifecycleEventListener.- Specified by:
addLifecycleEventListenerin interfaceMachine
-
removeLifecycleEventListener
public void removeLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener) Description copied from interface:MachineAllows to remove aProcessingUnitInstanceLifecycleEventListener.- Specified by:
removeLifecycleEventListenerin interfaceMachine
-
getProcessingUnitInstances
Description copied from interface:MachineReturns all the processing unit instances running on the machine.- Specified by:
getProcessingUnitInstancesin interfaceInternalProcessingUnitInstancesAware- Specified by:
getProcessingUnitInstancesin interfaceMachine
-
getProcessingUnitInstances
Description copied from interface:MachineReturns the processing unit instances of the specified name that are currently deployed on the machine.- Specified by:
getProcessingUnitInstancesin interfaceMachine
-
contains
Description copied from interface:MachineReturnstrueif the processing unit instance exists within the machine. -
getSpaceInstances
Description copied from interface:MachineReturns all the space instances running on the machine.- Specified by:
getSpaceInstancesin interfaceMachine
-
contains
Description copied from interface:MachineReturnstrueif the machine contains the provided space instance. -
getSpaceInstanceAdded
Description copied from interface:MachineReturns the space instance added event manager allowing to add and removeSpaceInstanceAddedEventListeners.- Specified by:
getSpaceInstanceAddedin interfaceMachine
-
getSpaceInstanceRemoved
Description copied from interface:MachineReturns the space instance removed event manager allowing to add and removeSpaceInstanceRemovedEventListeners.- Specified by:
getSpaceInstanceRemovedin interfaceMachine
-
addLifecycleListener
Description copied from interface:MachineAllows to add aSpaceInstanceLifecycleEventListener.- Specified by:
addLifecycleListenerin interfaceMachine
-
removeLifecycleListener
Description copied from interface:MachineAllows to remove aSpaceInstanceLifecycleEventListener.- Specified by:
removeLifecycleListenerin interfaceMachine
-
addProcessingUnitInstance
- Specified by:
addProcessingUnitInstancein interfaceInternalMachine
-
removeProcessingUnitInstance
- Specified by:
removeProcessingUnitInstancein interfaceInternalMachine
-
addSpaceInstance
- Specified by:
addSpaceInstancein interfaceInternalMachine
-
removeSpaceInstance
- Specified by:
removeSpaceInstancein interfaceInternalMachine
-
generateDump
Description copied from interface:DumpProviderGenerates dump for all the provided dump processors. Note, this will include a heap dump which can consume time and potentially be of very large size- Specified by:
generateDumpin interfaceDumpProvider- Parameters:
cause- The cause that this dump was generatedcontext- Allows to provide specific parameters to specific processors- Throws:
AdminException
-
generateDump
public DumpResult generateDump(String cause, Map<String, Object> context, String... processor) throws AdminExceptionDescription copied from interface:DumpProviderGenerates dump for the provided processors. The current list of processors include:- summary: General summary information of the process.
- network: Information on the network layer of the process and the OS network stats.
- thread: Thread dump of the process.
- heap: Heap dump of the process. Note, this is a heavy operation and can produce very large dump files
- log: Adds all the log files of the process to the dump file.
- processingUnits: Dump of all the processing units (applicable only for GSCs) information.
- Specified by:
generateDumpin interfaceDumpProvider- Parameters:
cause- The cause this dump was generated.context- Allows to provide specific parameters to specific processors.processor- The list of processors to be used.- Throws:
AdminException
-
equals
-
hashCode
public int hashCode()
-