GigaSpaces XAP 7.0 API

org.openspaces.admin.pu
Interface ProcessingUnitInstance

All Superinterfaces:
AdminAware, DiscoverableComponent, GridComponent, Iterable<ServiceDetails>, MachineAware, OperatingSystemAware, StatisticsMonitor, TransportAware, VirtualMachineAware, ZoneAware

public interface ProcessingUnitInstance
extends GridComponent, Iterable<ServiceDetails>, StatisticsMonitor

A processing unit instance is an actual running instance of a processing unit. For example, when deploying a processing unit with 4 instance, there will be eventually 4 instances of the processing unit.

Author:
kimchy

Field Summary
 
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
 
Method Summary
 void decrement()
          Decrements the instance (and destroying it in the process).
 void destroy()
          Destroy the instance.
 Map<String,AsyncPollingEventContainerServiceDetails> getAsyncPollingEventContainerDetails()
          Returns a map of AsyncPollingEventContainerServiceDetails keyed by their ServiceDetails.getId().
 int getBackupId()
          Returns the backup id of the processing unit instance.
 ClusterInfo getClusterInfo()
          Returns the cluster info of the processing unit instance.
 SpaceServiceDetails getEmbeddedSpaceDetails()
          Returns the embedded space service details as described by the service started within the processing unit.
 SpaceServiceDetails[] getEmbeddedSpacesDetails()
          Returns the embedded space service details as described by the service started within the processing unit.
 Map<String,EventContainerServiceDetails> getEventContainerDetails()
          Returns a map of EventContainerServiceDetails keyed by their ServiceDetails.getId().
 GridServiceContainer getGridServiceContainer()
          Returns the GridServiceContainer the processing unit is running on.
 int getInstanceId()
          Returns the instance id of the processing unit instance.
 JeeServiceDetails getJeeDetails()
          Returns the jee service details of the jee container that was started within this processing unit.
 String getName()
          Returns the name of the processing unit.
 Map<String,NotifyEventContainerServiceDetails> getNotifyEventContainerDetails()
          Returns a map of NotifyEventContainerServiceDetails keyed by their ServiceDetails.getId().
 ProcessingUnitPartition getPartition()
          Returns the processing unit partition this processing unit instance is part of.
 Map<String,PollingEventContainerServiceDetails> getPollingEventContainerDetails()
          Returns a map of PollingEventContainerServiceDetails keyed by their ServiceDetails.getId().
 ProcessingUnit getProcessingUnit()
          Returns the processing unit this processing unit instance belongs to.
 BeanLevelProperties getProperties()
          Return the properties the processing unit was deployed with.
 RemotingServiceDetails getRemotingDetails()
          Returns the remoting service details (the exporter) if configured within the processing unit.
 Map<String,ServiceDetails> getServiceDetailsByServiceId()
          Returns a map of service details by service id.
 ServiceDetails getServiceDetailsByServiceId(String serviceId)
          Returns the service details for a specific service id.
 Map<String,ServiceDetails[]> getServiceDetailsByServiceType()
          Returns a map of service details by service type.
 ServiceDetails[] getServicesDetailsByServiceType(String serviceType)
          Returns the service details by a service type ServiceDetails.getServiceType().
 SpaceServiceDetails[] getSpaceDetails()
          Returns the space service details as described by the service started within the processing unit.
 SpaceInstance getSpaceInstance()
          Returns a space instance that was started within the processing unit instance.
 SpaceInstance[] getSpaceInstances()
          Returns all the space instances that were stared within the processing unit instance.
 ProcessingUnitInstanceStatistics getStatistics()
          Returns the processing unit instance statistics.
 boolean isEmbeddedSpaces()
          Returns true if there are embedded spaces started within this processing unit.
 boolean isJee()
          Returns true if this processing unit is a jee processing unit.
 void relocate()
          Relocates the instance to any suitable GridServiceContainer.
 void relocate(GridServiceContainer gridServiceContainerToRelocateTo)
          Relocates the instance to the provided GridServiceContainer.
 ProcessingUnitInstance relocateAndWait()
          Relocates the any suitable GridServiceContainer.
 ProcessingUnitInstance relocateAndWait(long timeout, TimeUnit timeUnit)
          Relocates the any suitable GridServiceContainer.
 ProcessingUnitInstance relocateAnsWait(GridServiceContainer gridServiceContainerToRelocateTo)
          Relocates the instance to the provided GridServiceContainer.
 ProcessingUnitInstance relocateAnsWait(GridServiceContainer gridServiceContainerToRelocateTo, long timeout, TimeUnit timeUnit)
          Relocates the instance to the provided GridServiceContainer.
 void restart()
          Restarts the processing unit instance.
 ProcessingUnitInstance restartAndWait()
          Restarts the processing unit instance and waits indefinitely for the restarted processing unit instnace returning it.
 ProcessingUnitInstance restartAndWait(long timeout, TimeUnit timeUnit)
          Restarts the processing unit instance and waits for the restarted processing unit instnace returning it for the provided timeout.
 
Methods inherited from interface org.openspaces.admin.GridComponent
getUid
 
Methods inherited from interface org.openspaces.admin.DiscoverableComponent
isDiscovered
 
Methods inherited from interface org.openspaces.admin.AdminAware
getAdmin
 
Methods inherited from interface org.openspaces.admin.machine.MachineAware
getMachine
 
Methods inherited from interface org.openspaces.admin.transport.TransportAware
getTransport
 
Methods inherited from interface org.openspaces.admin.os.OperatingSystemAware
getOperatingSystem
 
Methods inherited from interface org.openspaces.admin.vm.VirtualMachineAware
getVirtualMachine
 
Methods inherited from interface org.openspaces.admin.zone.ZoneAware
getZones
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.openspaces.admin.StatisticsMonitor
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMontior
 

Method Detail

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.

See Also:
ProcessingUnit.canDecrementInstance()

relocate

void relocate(GridServiceContainer gridServiceContainerToRelocateTo)
Relocates the instance to the provided GridServiceContainer.

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 relocateAnsWait(org.openspaces.admin.gsc.GridServiceContainer) or relocateAnsWait(org.openspaces.admin.gsc.GridServiceContainer, long, java.util.concurrent.TimeUnit).


relocateAnsWait

ProcessingUnitInstance relocateAnsWait(GridServiceContainer gridServiceContainerToRelocateTo)
Relocates the instance to the provided GridServiceContainer. The relocated instance will be returned waiting for it indefinitely.


relocateAnsWait

ProcessingUnitInstance relocateAnsWait(GridServiceContainer gridServiceContainerToRelocateTo,
                                       long timeout,
                                       TimeUnit timeUnit)
Relocates the instance to the provided GridServiceContainer. The relocated instance will be returned waiting for it for the provided timeout.


relocate

void relocate()
Relocates the instance to any suitable GridServiceContainer.

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() or relocateAndWait(long, java.util.concurrent.TimeUnit) .


relocateAndWait

ProcessingUnitInstance relocateAndWait()
Relocates the any suitable GridServiceContainer. The relocated instance will be returned waiting for it indefinitely.


relocateAndWait

ProcessingUnitInstance relocateAndWait(long timeout,
                                       TimeUnit timeUnit)
Relocates the any suitable GridServiceContainer. 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 proceaaing unit instance is needed, or waiting for the restart is required, use restartAndWait() or restartAndWait(long, java.util.concurrent.TimeUnit).


restartAndWait

ProcessingUnitInstance restartAndWait()
Restarts the processing unit instance and waits indefinitely for the restarted processing unit instnace returning it.

See Also:
restart()

restartAndWait

ProcessingUnitInstance restartAndWait(long timeout,
                                      TimeUnit timeUnit)
Restarts the processing unit instance and waits for the restarted processing unit instnace returning it for the provided timeout.

See Also:
restart()

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 the GridServiceContainer the processing unit is running on.


getPartition

ProcessingUnitPartition getPartition()
Returns the processing unit partition this processing unit instance is part of.


getServiceDetailsByServiceId

ServiceDetails getServiceDetailsByServiceId(String serviceId)
Returns the service details for a specific service id.


getServiceDetailsByServiceId

Map<String,ServiceDetails> getServiceDetailsByServiceId()
Returns a map of service details by service id.


getServicesDetailsByServiceType

ServiceDetails[] getServicesDetailsByServiceType(String serviceType)
Returns the service details by a service type ServiceDetails.getServiceType().


getServiceDetailsByServiceType

Map<String,ServiceDetails[]> getServiceDetailsByServiceType()
Returns a map of service details by service type.


getEventContainerDetails

Map<String,EventContainerServiceDetails> getEventContainerDetails()
Returns a map of EventContainerServiceDetails keyed by their ServiceDetails.getId().


getPollingEventContainerDetails

Map<String,PollingEventContainerServiceDetails> getPollingEventContainerDetails()
Returns a map of PollingEventContainerServiceDetails keyed by their ServiceDetails.getId().


getNotifyEventContainerDetails

Map<String,NotifyEventContainerServiceDetails> getNotifyEventContainerDetails()
Returns a map of NotifyEventContainerServiceDetails keyed by their ServiceDetails.getId().


getAsyncPollingEventContainerDetails

Map<String,AsyncPollingEventContainerServiceDetails> getAsyncPollingEventContainerDetails()
Returns a map of AsyncPollingEventContainerServiceDetails keyed by their ServiceDetails.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. null if 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()
Returns true if 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 return null if no embedded space instances were started (or none has been detected yet).


getSpaceInstances

SpaceInstance[] getSpaceInstances()
Returns all the space instances that were stared 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).


isJee

boolean isJee()
Returns true if 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.


GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.