Interface ProcessingUnitInstance
- All Superinterfaces:
AdminAware,DiscoverableComponent,GridComponent,Iterable<ServiceDetails>,MachineAware,OperatingSystemAware,StatisticsMonitor,TransportAware,VirtualMachineAware,ZoneAware
- All Known Subinterfaces:
InternalProcessingUnitInstance
- All Known Implementing Classes:
DefaultProcessingUnitInstance
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
Method Summary
Modifier and TypeMethodDescriptionvoidDecrements the instance (and destroying it in the process).voiddestroy()Destroy the instance.Returns a map ofAsyncPollingEventContainerServiceDetailskeyed by theirServiceDetails.getId().intReturns the backup id of the processing unit instance.Returns the cluster info of the processing unit instance.Returns the embedded space service details as described by the service started within the processing unit.Returns the embedded space service details as described by the service started within the processing unit.Returns a map ofEventContainerServiceDetailskeyed by theirServiceDetails.getId().Returns theGridServiceContainerthe processing unit is running on.getId()Returns the Processing unit instance IdentifierintReturns the instance id of the processing unit instance.Returns the jee service details of the jee container that was started within this processing unit.getName()Returns the name of the processing unit.Returns a map ofNotifyEventContainerServiceDetailskeyed by theirServiceDetails.getId().Returns the processing unit partition this processing unit instance is part of.Returns a map ofPollingEventContainerServiceDetailskeyed by theirServiceDetails.getId().Returns the processing unit this processing unit instance belongs to.Get this processing unit instance String representation.
If this processing unit instance represents a Space instance, this method will return a similar result toSpaceInstance.getSpaceInstanceName(), but with the processing unit name as the Space name.Return the properties the processing unit was deployed with.Returns the remoting service details (the exporter) if configured within the processing unit.Returns a map of service details by service id.getServiceDetailsByServiceId(String serviceId) Returns the service details for a specific service id.Returns a map of service details by service type.getServicesDetailsByServiceType(String serviceType) Returns the service details by a service typeServiceDetails.getServiceType().Returns the space service details as described by the service started within the processing unit.Returns a space instance that was started within the processing unit instance.Returns all the space instances that were started within the processing unit instance.Returns the processing unit instance statistics.booleanReturnstrueif there are embedded spaces started within this processing unit.booleanisJee()Returnstrueif this processing unit is a jee processing unit.voidrelocate()Relocates the instance to any suitableGridServiceContainer.voidrelocate(GridServiceContainer gridServiceContainerToRelocateTo) Relocates the instance to the providedGridServiceContainer.Relocates the any suitableGridServiceContainer.relocateAndWait(long timeout, TimeUnit timeUnit) Relocates the any suitableGridServiceContainer.relocateAndWait(GridServiceContainer gridServiceContainerToRelocateTo) Relocates the instance to the providedGridServiceContainer.relocateAndWait(GridServiceContainer gridServiceContainerToRelocateTo, long timeout, TimeUnit timeUnit) Relocates the instance to the providedGridServiceContainer.voidrestart()Restarts the processing unit instance.Restarts the processing unit instance and waits indefinitely for the restarted processing unit instance returning it.restartAndWait(long timeout, TimeUnit timeUnit) Restarts the processing unit instance and waits for the restarted processing unit instance returning it for the provided timeout.waitForSpaceInstance(long timeout, TimeUnit timeUnit) Methods inherited from interface org.openspaces.admin.AdminAware
getAdminMethods inherited from interface org.openspaces.admin.DiscoverableComponent
isDiscoveredMethods inherited from interface org.openspaces.admin.GridComponent
getUidMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.openspaces.admin.machine.MachineAware
getMachineMethods inherited from interface org.openspaces.admin.os.OperatingSystemAware
getOperatingSystemMethods inherited from interface org.openspaces.admin.StatisticsMonitor
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitorMethods inherited from interface org.openspaces.admin.transport.TransportAware
getTransportMethods inherited from interface org.openspaces.admin.vm.VirtualMachineAware
getVirtualMachine
-
Method Details
-
getId
String getId()Returns the Processing unit instance Identifier- Since:
- 12.1
-
getProcessingUnitInstanceName
String getProcessingUnitInstanceName()Get this processing unit instance String representation.
If this processing unit instance represents a Space instance, this method will return a similar result toSpaceInstance.getSpaceInstanceName(), but with the processing unit name as the Space name. Otherwise, it will return: {Processing unit name} [instance id] - the name of this processing unit (seegetName()) and the instance id (seegetInstanceId()); for example, MyPU [3]- Returns:
- this processing unit instance String representation.
- Since:
- 8.0.5
-
destroy
void destroy()Destroy the instance. If breaches the SLA, will instantiate the instance again. -
decrement
void decrement()Decrements the instance (and destroying it in the process). Will not attempt to create it again. Does not apply for partitioned nor replicated topologies.- See Also:
-
relocate
Relocates the instance to the providedGridServiceContainer.Note, the current processing instance is unusable once this call has been made. If the relocated processing unit instance is needed, or waiting for the relocation is required, use
relocateAndWait(org.openspaces.admin.gsc.GridServiceContainer)orrelocateAndWait(org.openspaces.admin.gsc.GridServiceContainer, long, java.util.concurrent.TimeUnit). -
relocateAndWait
Relocates the instance to the providedGridServiceContainer. The relocated instance will be returned waiting for it indefinitely. -
relocateAndWait
ProcessingUnitInstance relocateAndWait(GridServiceContainer gridServiceContainerToRelocateTo, long timeout, TimeUnit timeUnit) Relocates the instance to the providedGridServiceContainer. The relocated instance will be returned waiting for it for the provided timeout. -
relocate
void relocate()Relocates the instance to any suitableGridServiceContainer.Note, the current processing instance is unusable once this call has been made. If the relocated processing unit instance is needed, or waiting for the relocation is required, use
relocateAndWait()orrelocateAndWait(long, java.util.concurrent.TimeUnit). -
relocateAndWait
ProcessingUnitInstance relocateAndWait()Relocates the any suitableGridServiceContainer. The relocated instance will be returned waiting for it indefinitely. -
relocateAndWait
Relocates the any suitableGridServiceContainer. The relocated instance will be returned waiting for it for the provided timeout. -
restart
void restart()Restarts the processing unit instance. Note, if this instance is running an embedded space instance, and the space instance is primary and there is a backup around as well, this method is handy to "turn" the backup to primary.Note, the current processing unit instance is unusable once this call has been made. If the restarted processing unit instance is needed, or waiting for the restart is required, use
restartAndWait()orrestartAndWait(long, java.util.concurrent.TimeUnit). -
restartAndWait
ProcessingUnitInstance restartAndWait()Restarts the processing unit instance and waits indefinitely for the restarted processing unit instance returning it.- See Also:
-
restartAndWait
Restarts the processing unit instance and waits for the restarted processing unit instance returning it for the provided timeout.- See Also:
-
getInstanceId
int getInstanceId()Returns the instance id of the processing unit instance. -
getBackupId
int getBackupId()Returns the backup id of the processing unit instance. -
getProcessingUnit
ProcessingUnit getProcessingUnit()Returns the processing unit this processing unit instance belongs to. -
getName
String getName()Returns the name of the processing unit. -
getClusterInfo
ClusterInfo getClusterInfo()Returns the cluster info of the processing unit instance. -
getProperties
BeanLevelProperties getProperties()Return the properties the processing unit was deployed with. -
getGridServiceContainer
GridServiceContainer getGridServiceContainer()Returns theGridServiceContainerthe processing unit is running on. -
getPartition
ProcessingUnitPartition getPartition()Returns the processing unit partition this processing unit instance is part of. -
getServiceDetailsByServiceId
Returns the service details for a specific service id. -
getServiceDetailsByServiceId
Map<String,ServiceDetails> getServiceDetailsByServiceId()Returns a map of service details by service id. -
getServicesDetailsByServiceType
Returns the service details by a service typeServiceDetails.getServiceType(). -
getServiceDetailsByServiceType
Map<String,ServiceDetails[]> getServiceDetailsByServiceType()Returns a map of service details by service type. -
getEventContainerDetails
Map<String,EventContainerServiceDetails> getEventContainerDetails()Returns a map ofEventContainerServiceDetailskeyed by theirServiceDetails.getId(). -
getPollingEventContainerDetails
Map<String,PollingEventContainerServiceDetails> getPollingEventContainerDetails()Returns a map ofPollingEventContainerServiceDetailskeyed by theirServiceDetails.getId(). -
getNotifyEventContainerDetails
Map<String,NotifyEventContainerServiceDetails> getNotifyEventContainerDetails()Returns a map ofNotifyEventContainerServiceDetailskeyed by theirServiceDetails.getId(). -
getAsyncPollingEventContainerDetails
Map<String,AsyncPollingEventContainerServiceDetails> getAsyncPollingEventContainerDetails()Returns a map ofAsyncPollingEventContainerServiceDetailskeyed by theirServiceDetails.getId(). -
getRemotingDetails
RemotingServiceDetails getRemotingDetails()Returns the remoting service details (the exporter) if configured within the processing unit. -
getSpaceDetails
SpaceServiceDetails[] getSpaceDetails()Returns the space service details as described by the service started within the processing unit. -
getEmbeddedSpaceDetails
SpaceServiceDetails getEmbeddedSpaceDetails()Returns the embedded space service details as described by the service started within the processing unit.nullif no embedded space was started within the processing unit. -
getEmbeddedSpacesDetails
SpaceServiceDetails[] getEmbeddedSpacesDetails()Returns the embedded space service details as described by the service started within the processing unit. -
isEmbeddedSpaces
boolean isEmbeddedSpaces()Returnstrueif there are embedded spaces started within this processing unit. -
getSpaceInstance
SpaceInstance getSpaceInstance()Returns a space instance that was started within the processing unit instance. Will returnnullif no embedded space instances were started (or none has been detected yet). -
getSpaceInstances
SpaceInstance[] getSpaceInstances()Returns all the space instances that were started within the processing unit instance. Will return an empty array if no space instances were started within this processing unit (or none has been detected yet). -
waitForSpaceInstance
SpaceInstance waitForSpaceInstance() -
waitForSpaceInstance
-
isJee
boolean isJee()Returnstrueif this processing unit is a jee processing unit. -
getJeeDetails
JeeServiceDetails getJeeDetails()Returns the jee service details of the jee container that was started within this processing unit. -
getStatistics
ProcessingUnitInstanceStatistics getStatistics()Returns the processing unit instance statistics. -
getMemberAliveIndicatorStatus
MemberAliveIndicatorStatus getMemberAliveIndicatorStatus()- Returns:
- Returns the current member alive indicator status of this processing unit instance.
- Since:
- 8.0.6
-