|
GigaSpaces XAP 8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProcessingUnit
A processing unit holds one or more ProcessingUnitInstance
s.
Field Summary |
---|
Fields inherited from interface org.openspaces.admin.StatisticsMonitor |
---|
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL |
Method Summary | |
---|---|
void |
addLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Adds a ProcessingUnitInstanceLifecycleEventListener . |
boolean |
canDecrementInstance()
Returns true if this processing unit allows to decrement instances on it. |
boolean |
canIncrementInstance()
Returns true if this processing unit allows to increment instances on it. |
void |
decrementInstance()
Will randomly decrement an instance from the processing units. |
Application |
getApplication()
|
GridServiceManager |
getBackupGridServiceManager(String gridServiceManagerUID)
Returns the backup GSM matching the provided UID. |
BackupGridServiceManagerChangedEventManager |
getBackupGridServiceManagerChanged()
Returns an event manager allowing to listen for BackupGridServiceManagerChangedEvent s. |
GridServiceManager[] |
getBackupGridServiceManagers()
Returns the backup GSMs for the processing unit. |
BeanLevelProperties |
getBeanLevelProperties()
Return the deploy time properties of the processing unit. |
ProcessingUnitDependencies<ProcessingUnitDependency> |
getDependencies()
|
ProcessingUnitInstance[] |
getInstances()
Returns the processing unit instances currently discovered. |
GridServiceManager |
getManagingGridServiceManager()
Returns the managing (primary) GSM for the processing unit. |
ManagingGridServiceManagerChangedEventManager |
getManagingGridServiceManagerChanged()
Returns an event manger allowing to listen for ManagingGridServiceManagerChangedEvent s. |
int |
getMaxInstancesPerMachine()
Returns the number of instances of this processing unit that can run within a Machine. |
int |
getMaxInstancesPerVM()
Returns the number of instances of this processing unit that can run within a VM. |
Map<String,Integer> |
getMaxInstancesPerZone()
Returns a map containing the zone name and the maximum number of instances for that zone. |
String |
getName()
Returns the name of the processing unit. |
int |
getNumberOfBackups()
Returns the number of backups (if the topology is a backup one) per instance, as defined in the processing unit's SLA. |
int |
getNumberOfInstances()
Returns the number of required instances as defined in the processing unit's SLA. |
ProcessingUnitPartition |
getPartition(int partitionId)
Returns a processing unit partition based on the specified partition id. |
ProcessingUnitPartition[] |
getPartitions()
Returns the processing unit partitions of this processing unit. |
ProcessingUnitInstanceAddedEventManager |
getProcessingUnitInstanceAdded()
Returns an event manager allowing to register ProcessingUnitInstanceAddedEventListener s. |
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager |
getProcessingUnitInstanceMemberAliveIndicatorStatusChanged()
Returns an event manager allowing to register ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventListener s. |
ProcessingUnitInstanceProvisionStatusChangedEventManager |
getProcessingUnitInstanceProvisionStatusChanged()
Returns an event manager allowing to register ProcessingUnitInstanceProvisionStatusChangedEventListener s. |
ProcessingUnitInstanceRemovedEventManager |
getProcessingUnitInstanceRemoved()
Returns an event manager allowing to register ProcessingUnitInstanceRemovedEventListener s. |
ProcessingUnitInstanceStatisticsChangedEventManager |
getProcessingUnitInstanceStatisticsChanged()
Returns a processing unit instance statistics change event manger allowing to register for events of ProcessingUnitInstanceStatisticsChangedEvent . |
ProcessingUnits |
getProcessingUnits()
Returns the handle to all the different processing units. |
ProcessingUnitStatusChangedEventManager |
getProcessingUnitStatusChanged()
Returns an event manager allowing to listen for ProcessingUnitStatusChangedEvent s. |
String[] |
getRequiredZones()
Returns the list of zones this processing units are required to run on. |
Space |
getSpace()
Returns the (first) embedded space within a processing unit. |
ProcessingUnitSpaceCorrelatedEventManager |
getSpaceCorrelated()
Returns an event manager allowing to listen for ProcessingUnitSpaceCorrelatedEvent s. |
Space[] |
getSpaces()
Returns all the embedded spaces within a processing unit. |
DeploymentStatus |
getStatus()
Returns the deployment status of the processing unit. |
int |
getTotalNumberOfInstances()
Returns the total required number of instances as defined in the processing SLA. |
ProcessingUnitType |
getType()
Returns the type of processing unit: stateless, stateful, mirror, web. |
void |
incrementInstance()
Will increment a processing unit instance. |
boolean |
isManaged()
Returns true if there is a managing GSM for it. |
void |
removeLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Removes a ProcessingUnitInstanceLifecycleEventListener . |
void |
scale(ScaleStrategyConfig strategyConfig)
Modifies the processing unit scalability strategy. |
void |
scaleAndWait(ScaleStrategyConfig strategyConfig)
Modifies the processing unit scalability strategy and waits until scale is complete This method is only available if the processing unit deployment is elastic |
boolean |
scaleAndWait(ScaleStrategyConfig strategyConfig,
long timeout,
TimeUnit timeUnit)
Modifies the processing unit scalability strategy and waits until scale is complete This method is only available if the processing unit deployment is elastic |
void |
undeploy()
|
void |
undeployAndWait()
Un-deploys the processing unit and waits until all instances have been undeployed. |
boolean |
undeployAndWait(long timeout,
TimeUnit timeunit)
Undeploys the processing unit and waits until all instances have been undeployed. |
boolean |
waitFor(int numberOfProcessingUnitInstances)
Waits till at least the provided number of Processing Unit Instances are up. |
boolean |
waitFor(int numberOfProcessingUnitInstances,
long timeout,
TimeUnit timeUnit)
Waits till at least the provided number of Processing Unit Instances are up for the specified timeout. |
GridServiceManager |
waitForManaged()
Waits till there is a managing GridServiceManager for the processing unit. |
GridServiceManager |
waitForManaged(long timeout,
TimeUnit timeUnit)
Waits till there is a managing GridServiceManager for the processing unit
for the specified timeout. |
Space |
waitForSpace()
Waits till an embedded Space is correlated with the processing unit. |
Space |
waitForSpace(long timeout,
TimeUnit timeUnit)
Waits till an embedded Space is correlated with the processing unit for the specified timeout. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.openspaces.admin.AdminAware |
---|
getAdmin |
Methods inherited from interface org.openspaces.admin.StatisticsMonitor |
---|
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitor |
Method Detail |
---|
ProcessingUnits getProcessingUnits()
String getName()
int getNumberOfInstances()
getTotalNumberOfInstances()
.
Note that this method does not count the number of running instances, but rather the number of planned
instances for the processing unit. To count the number of active processing unit instances please use the method
getInstances()
.
int getNumberOfBackups()
int getTotalNumberOfInstances()
getNumberOfInstances()
. If there are backups,
will return getNumberOfInstances()
* (getNumberOfBackups()
+ 1)
Note that this method does not count the number of running instances, but rather the total number of planned
instances for the processing unit. To count the number of active processing unit instances please use the method
getInstances()
.
int getMaxInstancesPerVM()
In case of a partitioned with backup topology, it applies on a per partition level (meaning that a primary and backup will not run on the same VM).
In case of a non backup based topology, it applies on the number of instances of the whole processing unit that can run on the same VM).
int getMaxInstancesPerMachine()
In case of a partitioned with backup topology, it applies on a per partition level (meaning that a primary and backup will not run on the same Machine).
In case of a non backup based topology, it applies on the number of instances of the whole processing unit that can run on the same Machine).
Map<String,Integer> getMaxInstancesPerZone()
String[] getRequiredZones()
DeploymentStatus getStatus()
BeanLevelProperties getBeanLevelProperties()
ProcessingUnitType getType()
boolean waitFor(int numberOfProcessingUnitInstances)
boolean waitFor(int numberOfProcessingUnitInstances, long timeout, TimeUnit timeUnit)
Space waitForSpace()
Space waitForSpace(long timeout, TimeUnit timeUnit)
GridServiceManager waitForManaged()
GridServiceManager
for the processing unit.
GridServiceManager waitForManaged(long timeout, TimeUnit timeUnit)
GridServiceManager
for the processing unit
for the specified timeout.
boolean canIncrementInstance()
true
if this processing unit allows to increment instances on it.
boolean canDecrementInstance()
true
if this processing unit allows to decrement instances on it.
void incrementInstance()
void decrementInstance()
ProcessingUnitInstance.decrement()
.
boolean isManaged()
true
if there is a managing GSM for it.
GridServiceManager getManagingGridServiceManager()
GridServiceManager[] getBackupGridServiceManagers()
GridServiceManager getBackupGridServiceManager(String gridServiceManagerUID)
void undeploy()
undeployAndWait()
,
undeployAndWait(long, TimeUnit)
void undeployAndWait()
The undeployment process will wait indefinitely and return when all processing units have undeployed.
undeployAndWait(long, TimeUnit)
,
undeploy()
boolean undeployAndWait(long timeout, TimeUnit timeunit)
The undeployment process will wait for the given timeout and return when all processing units have undeployed or timeout expired.
undeployAndWait()
,
undeploy()
Space getSpace()
null
if
no embedded space is defined within the processing unit or if no processing unit instance
has been added to the processing unit.
Space[] getSpaces()
ProcessingUnitInstance[] getInstances()
ProcessingUnitPartition[] getPartitions()
ProcessingUnitPartition getPartition(int partitionId)
ProcessingUnitInstanceAddedEventManager getProcessingUnitInstanceAdded()
ProcessingUnitInstanceAddedEventListener
s.
ProcessingUnitInstanceRemovedEventManager getProcessingUnitInstanceRemoved()
ProcessingUnitInstanceRemovedEventListener
s.
void addLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
ProcessingUnitInstanceLifecycleEventListener
.
void removeLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
ProcessingUnitInstanceLifecycleEventListener
.
ManagingGridServiceManagerChangedEventManager getManagingGridServiceManagerChanged()
ManagingGridServiceManagerChangedEvent
s.
BackupGridServiceManagerChangedEventManager getBackupGridServiceManagerChanged()
BackupGridServiceManagerChangedEvent
s.
ProcessingUnitStatusChangedEventManager getProcessingUnitStatusChanged()
ProcessingUnitStatusChangedEvent
s.
ProcessingUnitSpaceCorrelatedEventManager getSpaceCorrelated()
ProcessingUnitSpaceCorrelatedEvent
s.
ProcessingUnitInstanceStatisticsChangedEventManager getProcessingUnitInstanceStatisticsChanged()
ProcessingUnitInstanceStatisticsChangedEvent
.
Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
ProcessingUnitInstanceProvisionStatusChangedEventManager getProcessingUnitInstanceProvisionStatusChanged()
ProcessingUnitInstanceProvisionStatusChangedEventListener
s.
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager getProcessingUnitInstanceMemberAliveIndicatorStatusChanged()
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventListener
s.
void scale(ScaleStrategyConfig strategyConfig)
strategyConfig
- scaleAndWait(ScaleStrategyConfig)
,
scaleAndWait(ScaleStrategyConfig, long, TimeUnit)
void scaleAndWait(ScaleStrategyConfig strategyConfig)
strategyConfig
- scale(ScaleStrategyConfig)
boolean scaleAndWait(ScaleStrategyConfig strategyConfig, long timeout, TimeUnit timeUnit)
strategyConfig
-
scale(ScaleStrategyConfig)
Application getApplication()
ProcessingUnitDependencies<ProcessingUnitDependency> getDependencies()
|
GigaSpaces XAP 8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |