|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
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. |
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. |
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 instnaces of this processing unit that can run within a Machine. |
int |
getMaxInstancesPerVM()
Returns the number of instnaces 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. |
int |
getNumberOfInstances()
Returns the number of instances of the processing unit. |
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. |
ProcessingUnitInstanceRemovedEventManager |
getProcessingUnitInstanceRemoved()
Returns an event manager allowing to register ProcessingUnitInstanceRemovedEventListener s. |
ProcessingUnitInstanceStatisticsChangedEventManager |
getProcessingUnitInstanceStatisticsChange()
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 number of instances. |
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 |
undeploy()
Undeploys the processing unit. |
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, stopStatisticsMontior |
Method Detail |
---|
ProcessingUnits getProcessingUnits()
String getName()
int getNumberOfInstances()
int getNumberOfBackups()
int getTotalNumberOfInstances()
getNumberOfInstances()
. If there are backups, will return getNumberOfInstances()
* (getNumberOfBackups()
+ 1)
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()
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()
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 getProcessingUnitInstanceStatisticsChange()
ProcessingUnitInstanceStatisticsChangedEvent
.
Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |