public class DefaultProcessingUnit extends Object implements InternalProcessingUnit
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
Constructor and Description |
---|
DefaultProcessingUnit(InternalAdmin admin,
InternalProcessingUnits processingUnits,
com.gigaspaces.grid.gsm.PUDetails details,
BeanLevelProperties beanLevelProperties) |
Modifier and Type | Method and Description |
---|---|
void |
addBackupGridServiceManager(GridServiceManager backupGridServiceManager) |
void |
addEmbeddedSpace(Space space) |
void |
addLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
|
void |
addManagingGridServiceManager(GridServiceManager gridServiceManager) |
void |
addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) |
void |
addStatisticsCalculation(ProcessingUnitStatisticsId statisticsId)
Adds the specified statistics calculation
|
void |
cancelScaleOut() |
boolean |
canDecrementInstance() |
boolean |
canIncrementInstance() |
void |
decrementInstance()
Removes a randomly chosen instance from the processing unit, and decrements the number of
instances.
|
boolean |
decrementPlannedInstances()
Decrements a planned instance if the number of planned instances is less then the actual
instances to maintain.
|
boolean |
equals(Object o) |
Admin |
getAdmin()
Returns the
Admin associated with this element. |
Application |
getApplication() |
String |
getApplicationDependencies()
This method is used by the webui.
|
String |
getApplicationName() |
String |
getArchiveName() |
GridServiceManager |
getBackupGridServiceManager(String gridServiceManagerUID) |
BackupGridServiceManagerChangedEventManager |
getBackupGridServiceManagerChanged() |
GridServiceManager[] |
getBackupGridServiceManagers() |
BeanLevelProperties |
getBeanLevelProperties() |
String |
getClusterSchema() |
ClusterTopology |
getClusterTopology() |
ProcessingUnitDependencies<ProcessingUnitDependency> |
getDependencies() |
Map<String,String> |
getElasticProperties() |
GridServiceContainer[] |
getGridServiceContainers() |
ExactZonesConfig |
getHostingGridServiceAgentZones(ProcessingUnitInstance processingUnitInstance)
return the exact zones of the agent that belongs to processing unit instance
|
ProcessingUnitInstance[] |
getInstances() |
GridServiceManager |
getManagingGridServiceManager() |
ManagingGridServiceManagerChangedEventManager |
getManagingGridServiceManagerChanged() |
int |
getMaxInstancesPerMachine() |
int |
getMaxInstancesPerVM() |
Map<String,Integer> |
getMaxInstancesPerZone() |
String |
getName() |
int |
getNumberOfBackups() |
int |
getNumberOfInstances()
Deprecated.
|
ProcessingUnitPartition |
getPartition(int partitionId) |
ProcessingUnitPartition[] |
getPartitions() |
int |
getPlannedNumberOfInstances()
For stateful processing unit (primary+backup Space) will return the current planned
number of instances (including backups).
|
int |
getPlannedNumberOfPartitions()
For stateful processing unit (primary+backup Space) will return the planned partition count -
i.e.
|
Set<String> |
getPrimaryZones() |
ProcessingUnitInstance |
getProcessingUnitInstance(int instanceId,
int backupId) |
ProcessingUnitInstanceAddedEventManager |
getProcessingUnitInstanceAdded() |
ProcessingUnitInstance |
getProcessingUnitInstanceByUid(String uid)
returns the processing unit instance based on its uid (see
GridComponent.getUid() ) |
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager |
getProcessingUnitInstanceMemberAliveIndicatorStatusChanged() |
ProcessingUnitInstanceProvisionStatusChangedEventManager |
getProcessingUnitInstanceProvisionStatusChanged() |
ProcessingUnitInstanceRemovedEventManager |
getProcessingUnitInstanceRemoved() |
ProcessingUnitInstance[] |
getProcessingUnitInstances() |
ProcessingUnitInstanceStatisticsChangedEventManager |
getProcessingUnitInstanceStatisticsChanged() |
ProcessingUnits |
getProcessingUnits() |
ProcessingUnitStatusChangedEventManager |
getProcessingUnitStatusChanged() |
Map<String,InternalProvisionStatusHolder> |
getProvisionStatusPerInstance() |
QuiesceDetails |
getQuiesceDetails() |
RequiredZonesConfig |
getRequiredContainerZones() |
String[] |
getRequiredZones() |
ScaleStrategyConfig |
getScaleStrategyConfig()
Returns the current scale strategy config
|
String |
getSimpleName()
In the case of application name prefix just processing unit name will be returned.
|
Space |
getSpace() |
ProcessingUnitSpaceCorrelatedEventManager |
getSpaceCorrelated() |
Space[] |
getSpaces() |
ProcessingUnitStatistics |
getStatistics() |
Set<ProcessingUnitStatisticsId> |
getStatisticsCalculations() |
DeploymentStatus |
getStatus() |
int |
getTotalNumberOfInstances()
Deprecated.
|
ProcessingUnitType |
getType() |
int |
hashCode() |
boolean |
hasSpace()
Returns true if there are any embedded spaces, false otherwise.
|
void |
incrementInstance()
Increments the number of processing unit instances.
|
boolean |
isBackupGsmInSync() |
boolean |
isManaged() |
boolean |
isMonitoring()
Returns
true if statistics are now being monitored. |
boolean |
isRequiresIsolation() |
boolean |
isStandaloneProcessingUnit() |
boolean |
isStub() |
Iterator<ProcessingUnitInstance> |
iterator() |
SharedLock |
lock() |
SharedLock |
lock(long timeout,
TimeUnit timeunit) |
void |
processProvisionEvent(org.jini.rio.monitor.ProvisionLifeCycleEvent provisionLifeCycleEvent) |
QuiesceResult |
quiesce(QuiesceRequest request)
Requests a quiesce request from the GSM.
|
QuiesceResult |
quiesceUnsafe(QuiesceRequest request)
Performs quiesce - should always be called after acquiring pu lock
|
void |
removeBackupGridServiceManager(String gsmUID) |
boolean |
removeEmbeddedSpace(Space space) |
void |
removeLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Removes a
ProcessingUnitInstanceLifecycleEventListener . |
void |
removeProcessingUnitInstance(String uid) |
void |
removeStatisticsCalculation(ProcessingUnitStatisticsId statisticsId)
Removes the specified statistics calculation
|
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 |
scaleHorizontal(int target,
String memory,
String cpu) |
void |
scaleVertical(String memory,
String cpu,
Long timeout,
PuScaleVStatusChangedEventListener listener) |
void |
setApplication(Application application) |
void |
setBackupGsmInSync(boolean backupGsmIsInSync) |
void |
setElasticProperties(Map<String,String> properties)
Deprecated.
|
void |
setLogLevel(String loggerName,
String level) |
void |
setManagingGridServiceManager(GridServiceManager gridServiceManager) |
void |
setNumberOfBackups(int numberOfBackups) |
void |
setNumberOfInstances(int numberOfInstances) |
void |
setStatisticsHistorySize(int historySize)
Sets the history size of number of statistics stored.
|
void |
setStatisticsInterval(long interval,
TimeUnit timeUnit)
Sets the statistics interval, automatically updating the monitoring scheduled tasks if
monitoring is enabled.
|
boolean |
setStatus(int statusCode) |
void |
setStub(boolean stub) |
void |
startStatisticsMonitor()
Starts the statistics monitor, starting a scheduled monitor that polls for statistics.
|
void |
stopStatisticsMonitor()
Stops the statistics monitor.
|
void |
undeploy() |
void |
undeployAndWait()
Un-deploys the processing unit and waits until all instances have been undeployed.
|
boolean |
undeployAndWait(long timeout,
TimeUnit timeUnit)
Undeploy the processing unit and wait until all instances have been undeployed.
|
CompletableFuture<?> |
undeployAsync() |
CompletableFuture<?> |
undeployAsync(UndeployOptions options) |
void |
unquiesce(QuiesceRequest request)
Requests a unquiesce request from the GSM.
|
void |
updateStub(ProcessingUnitInstance processingUnitInstance) |
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.
|
boolean |
waitFor(QuiesceState desiredState)
Same as
ProcessingUnit.waitFor(com.gigaspaces.admin.quiesce.QuiesceState, long,
java.util.concurrent.TimeUnit) but with endless timeout |
boolean |
waitFor(QuiesceState desiredState,
long timeout,
TimeUnit timeUnit) |
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.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultProcessingUnit(InternalAdmin admin, InternalProcessingUnits processingUnits, com.gigaspaces.grid.gsm.PUDetails details, BeanLevelProperties beanLevelProperties)
public ProcessingUnits getProcessingUnits()
getProcessingUnits
in interface ProcessingUnit
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public String getName()
getName
in interface ProcessingUnit
public BeanLevelProperties getBeanLevelProperties()
getBeanLevelProperties
in interface ProcessingUnit
public ProcessingUnitType getType()
getType
in interface ProcessingUnit
public ManagingGridServiceManagerChangedEventManager getManagingGridServiceManagerChanged()
getManagingGridServiceManagerChanged
in interface ProcessingUnit
ManagingGridServiceManagerChangedEvent
s.public void setLogLevel(String loggerName, String level) throws AdminException
setLogLevel
in interface ProcessingUnit
AdminException
public BackupGridServiceManagerChangedEventManager getBackupGridServiceManagerChanged()
getBackupGridServiceManagerChanged
in interface ProcessingUnit
BackupGridServiceManagerChangedEvent
s.public boolean hasSpace()
ProcessingUnit
hasSpace
in interface ProcessingUnit
public Space getSpace()
getSpace
in interface ProcessingUnit
null
if no embedded space is defined within the processing unit or if no
processing unit instance has been added to the processing unit.public Space[] getSpaces()
getSpaces
in interface ProcessingUnit
public void addEmbeddedSpace(Space space)
addEmbeddedSpace
in interface InternalProcessingUnit
public boolean removeEmbeddedSpace(Space space)
removeEmbeddedSpace
in interface InternalProcessingUnit
public Map<String,String> getElasticProperties()
getElasticProperties
in interface InternalProcessingUnit
public ProcessingUnitStatusChangedEventManager getProcessingUnitStatusChanged()
getProcessingUnitStatusChanged
in interface ProcessingUnit
ProcessingUnitStatusChangedEvent
s.public ProcessingUnitInstanceAddedEventManager getProcessingUnitInstanceAdded()
getProcessingUnitInstanceAdded
in interface ProcessingUnit
ProcessingUnitInstanceAddedEventListener
s.public ProcessingUnitInstanceRemovedEventManager getProcessingUnitInstanceRemoved()
getProcessingUnitInstanceRemoved
in interface ProcessingUnit
ProcessingUnitInstanceRemovedEventListener
s.public ProcessingUnitSpaceCorrelatedEventManager getSpaceCorrelated()
getSpaceCorrelated
in interface ProcessingUnit
ProcessingUnitSpaceCorrelatedEvent
s.public ProcessingUnitInstance getProcessingUnitInstance(int instanceId, int backupId)
getProcessingUnitInstance
in interface ProcessingUnit
public void addLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
ProcessingUnit
addLifecycleListener
in interface ProcessingUnit
public void removeLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
ProcessingUnit
ProcessingUnitInstanceLifecycleEventListener
.removeLifecycleListener
in interface ProcessingUnit
@Deprecated public int getNumberOfInstances()
getNumberOfInstances
in interface ProcessingUnit
public int getPlannedNumberOfPartitions()
ProcessingUnit
ProcessingUnit.getPartitions()
.getPlannedNumberOfPartitions
in interface ProcessingUnit
public int getPlannedNumberOfInstances()
ProcessingUnit
ProcessingUnit.getInstances()
.getPlannedNumberOfInstances
in interface ProcessingUnit
public void setNumberOfInstances(int numberOfInstances)
setNumberOfInstances
in interface InternalProcessingUnit
public int getNumberOfBackups()
getNumberOfBackups
in interface ProcessingUnit
public void setNumberOfBackups(int numberOfBackups)
setNumberOfBackups
in interface InternalProcessingUnit
@Deprecated public int getTotalNumberOfInstances()
getTotalNumberOfInstances
in interface ProcessingUnit
ProcessingUnit.getNumberOfInstances()
. If there are backups, will
return ProcessingUnit.getNumberOfInstances()
* (ProcessingUnit.getNumberOfBackups()
+ 1)public int getMaxInstancesPerVM()
getMaxInstancesPerVM
in interface ProcessingUnit
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).
public boolean isRequiresIsolation()
isRequiresIsolation
in interface ProcessingUnit
public int getMaxInstancesPerMachine()
getMaxInstancesPerMachine
in interface ProcessingUnit
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).
public String getClusterSchema()
getClusterSchema
in interface InternalProcessingUnit
public Map<String,Integer> getMaxInstancesPerZone()
getMaxInstancesPerZone
in interface ProcessingUnit
public String[] getRequiredZones()
getRequiredZones
in interface ProcessingUnit
public Set<String> getPrimaryZones()
getPrimaryZones
in interface ProcessingUnit
public DeploymentStatus getStatus()
getStatus
in interface ProcessingUnit
public boolean waitFor(int numberOfProcessingUnitInstances)
ProcessingUnit
waitFor
in interface ProcessingUnit
true
if discovered the required number of instances within the default
timeout and false
if the waiting time elapsed before the discovery took placepublic boolean waitFor(int numberOfProcessingUnitInstances, long timeout, TimeUnit timeUnit)
ProcessingUnit
waitFor
in interface ProcessingUnit
true
if discovered the required number of instances within the specified
timeout and false
if the waiting time elapsed before the discovery took placepublic Space waitForSpace()
ProcessingUnit
waitForSpace
in interface ProcessingUnit
null
if the waiting time elapsed before
correlation took place.public Space waitForSpace(long timeout, TimeUnit timeUnit)
ProcessingUnit
waitForSpace
in interface ProcessingUnit
null
if the waiting time elapsed before
correlation took place.public GridServiceManager waitForManaged()
ProcessingUnit
GridServiceManager
for the
processing unit.waitForManaged
in interface ProcessingUnit
null
if the waiting time elapsed before
discovery took place.public GridServiceManager waitForManaged(long timeout, TimeUnit timeUnit)
ProcessingUnit
GridServiceManager
for the
processing unit for the specified timeout.waitForManaged
in interface ProcessingUnit
null
if the waiting time elapsed before
discovery took place.public boolean canIncrementInstance()
canIncrementInstance
in interface ProcessingUnit
true
if this processing unit allows to increment instances on
it.public boolean canDecrementInstance()
canDecrementInstance
in interface ProcessingUnit
true
if this processing unit allows to decrement instances on
it.public void incrementInstance()
ProcessingUnit
incrementInstance
in interface ProcessingUnit
public void decrementInstance()
ProcessingUnit
ProcessingUnitInstance.decrement()
instead. Does not
apply for partitioned nor replicated topologies.decrementInstance
in interface ProcessingUnit
public GridServiceManager getManagingGridServiceManager()
getManagingGridServiceManager
in interface ProcessingUnit
public GridServiceManager[] getBackupGridServiceManagers()
getBackupGridServiceManagers
in interface ProcessingUnit
public boolean isManaged()
isManaged
in interface ProcessingUnit
true
if there is a managing GSM for it.public GridServiceManager getBackupGridServiceManager(String gridServiceManagerUID)
getBackupGridServiceManager
in interface ProcessingUnit
public CompletableFuture<?> undeployAsync()
undeployAsync
in interface ProcessingUnit
public CompletableFuture<?> undeployAsync(UndeployOptions options)
undeployAsync
in interface ProcessingUnit
options
- determine the wanted drain behaviour before undeployUndeployOptions
public boolean undeployAndWait(long timeout, TimeUnit timeUnit)
ProcessingUnit
The undeployment process will wait for the given timeout and return when all processing units have undeployed or timeout expired.
undeployAndWait
in interface ProcessingUnit
ProcessingUnit.undeployAsync()
,
ProcessingUnit.undeployAndWait()
,
ProcessingUnit.undeploy()
public void undeployAndWait()
ProcessingUnit
The undeployment process will wait indefinitely and return when all processing units have undeployed.
undeployAndWait
in interface ProcessingUnit
ProcessingUnit.undeployAsync()
,
ProcessingUnit.undeployAndWait(long, TimeUnit)
,
ProcessingUnit.undeploy()
public void undeploy()
undeploy
in interface ProcessingUnit
()
,
ProcessingUnit.undeployAndWait()
,
ProcessingUnit.undeployAndWait(long, TimeUnit)
public void setManagingGridServiceManager(GridServiceManager gridServiceManager)
setManagingGridServiceManager
in interface InternalProcessingUnit
public void addManagingGridServiceManager(GridServiceManager gridServiceManager)
addManagingGridServiceManager
in interface InternalProcessingUnit
public void addBackupGridServiceManager(GridServiceManager backupGridServiceManager)
addBackupGridServiceManager
in interface InternalProcessingUnit
public void removeBackupGridServiceManager(String gsmUID)
removeBackupGridServiceManager
in interface InternalProcessingUnit
public boolean setStatus(int statusCode)
setStatus
in interface InternalProcessingUnit
public Iterator<ProcessingUnitInstance> iterator()
iterator
in interface Iterable<ProcessingUnitInstance>
public ProcessingUnitInstance[] getInstances()
getInstances
in interface ProcessingUnit
public ProcessingUnitInstance[] getProcessingUnitInstances()
getProcessingUnitInstances
in interface InternalProcessingUnitInstancesAware
public ProcessingUnitPartition[] getPartitions()
getPartitions
in interface ProcessingUnit
public ProcessingUnitPartition getPartition(int partitionId)
getPartition
in interface ProcessingUnit
public void addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance)
addProcessingUnitInstance
in interface InternalProcessingUnit
public void removeProcessingUnitInstance(String uid)
removeProcessingUnitInstance
in interface InternalProcessingUnit
public ProcessingUnitInstanceStatisticsChangedEventManager getProcessingUnitInstanceStatisticsChanged()
getProcessingUnitInstanceStatisticsChanged
in interface ProcessingUnit
ProcessingUnitInstanceStatisticsChangedEvent
.
Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
public void setStatisticsInterval(long interval, TimeUnit timeUnit)
StatisticsMonitor
setStatisticsInterval
in interface StatisticsMonitor
public void setStatisticsHistorySize(int historySize)
StatisticsMonitor
setStatisticsHistorySize
in interface StatisticsMonitor
public void startStatisticsMonitor()
StatisticsMonitor
startStatisticsMonitor
in interface StatisticsMonitor
public void stopStatisticsMonitor()
StatisticsMonitor
stopStatisticsMonitor
in interface StatisticsMonitor
public boolean isMonitoring()
StatisticsMonitor
true
if statistics are now being monitored.isMonitoring
in interface StatisticsMonitor
public void scale(ScaleStrategyConfig strategyConfig)
ProcessingUnit
scale
in interface ProcessingUnit
ProcessingUnit.scaleAndWait(ScaleStrategyConfig)
,
ProcessingUnit.scaleAndWait(ScaleStrategyConfig, long, TimeUnit)
public void scaleAndWait(ScaleStrategyConfig strategyConfig)
ProcessingUnit
scaleAndWait
in interface ProcessingUnit
ProcessingUnit.scale(ScaleStrategyConfig)
public boolean scaleAndWait(ScaleStrategyConfig strategyConfig, long timeout, TimeUnit timeunit)
ProcessingUnit
scaleAndWait
in interface ProcessingUnit
false
if timeout occurred before scale operation has completed.ProcessingUnit.scale(ScaleStrategyConfig)
@Deprecated public void setElasticProperties(Map<String,String> properties)
public String getApplicationName()
getApplicationName
in interface InternalProcessingUnit
public Application getApplication()
getApplication
in interface ProcessingUnit
public void setApplication(Application application)
setApplication
in interface InternalApplicationAware
public ScaleStrategyConfig getScaleStrategyConfig()
InternalProcessingUnit
getScaleStrategyConfig
in interface InternalProcessingUnit
public boolean decrementPlannedInstances()
InternalProcessingUnit
decrementPlannedInstances
in interface InternalProcessingUnit
true
if a planned instance was successfully decremented;
false
planned instances hasn't changed.public String getApplicationDependencies()
getApplicationDependencies
in interface InternalProcessingUnit
public ProcessingUnitDependencies<ProcessingUnitDependency> getDependencies()
getDependencies
in interface ProcessingUnit
public void processProvisionEvent(org.jini.rio.monitor.ProvisionLifeCycleEvent provisionLifeCycleEvent)
processProvisionEvent
in interface InternalProcessingUnit
public Map<String,InternalProvisionStatusHolder> getProvisionStatusPerInstance()
getProvisionStatusPerInstance
in interface InternalProcessingUnit
public String getSimpleName()
InternalProcessingUnit
getSimpleName
in interface InternalProcessingUnit
public ProcessingUnitInstanceProvisionStatusChangedEventManager getProcessingUnitInstanceProvisionStatusChanged()
getProcessingUnitInstanceProvisionStatusChanged
in interface ProcessingUnit
ProcessingUnitInstanceProvisionStatusChangedEventListener
s.public ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager getProcessingUnitInstanceMemberAliveIndicatorStatusChanged()
getProcessingUnitInstanceMemberAliveIndicatorStatusChanged
in interface ProcessingUnit
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventListener
s.public ProcessingUnitStatistics getStatistics()
getStatistics
in interface InternalProcessingUnit
public ExactZonesConfig getHostingGridServiceAgentZones(ProcessingUnitInstance processingUnitInstance) throws AdminException
InternalProcessingUnit
getHostingGridServiceAgentZones
in interface InternalProcessingUnit
processingUnitInstance
- AdminException
public void addStatisticsCalculation(ProcessingUnitStatisticsId statisticsId)
InternalProcessingUnit
addStatisticsCalculation
in interface InternalProcessingUnit
public void removeStatisticsCalculation(ProcessingUnitStatisticsId statisticsId)
InternalProcessingUnit
removeStatisticsCalculation
in interface InternalProcessingUnit
public Set<ProcessingUnitStatisticsId> getStatisticsCalculations()
getStatisticsCalculations
in interface InternalProcessingUnit
public RequiredZonesConfig getRequiredContainerZones()
getRequiredContainerZones
in interface ProcessingUnit
public GridServiceContainer[] getGridServiceContainers()
getGridServiceContainers
in interface ProcessingUnit
public boolean isBackupGsmInSync()
isBackupGsmInSync
in interface InternalProcessingUnit
public ProcessingUnitInstance getProcessingUnitInstanceByUid(String uid)
InternalProcessingUnit
GridComponent.getUid()
)getProcessingUnitInstanceByUid
in interface InternalProcessingUnit
uid
- the unique id of the processing unit instancepublic boolean isStandaloneProcessingUnit()
isStandaloneProcessingUnit
in interface InternalProcessingUnit
public void setBackupGsmInSync(boolean backupGsmIsInSync)
setBackupGsmInSync
in interface InternalProcessingUnit
backupGsmIsInSync
- - true if backup GSM is in sync with primary GSM, false if out of
sync.public QuiesceResult quiesce(QuiesceRequest request)
ProcessingUnit
ProcessingUnit.waitFor(com.gigaspaces.admin.quiesce.QuiesceState)
returned true) all space instances and
listeners will switch to quiesced mode. If the GSM rejects the request an exception with the
rejection failure will be thrown. (precondition: the processing unit is intact)quiesce
in interface ProcessingUnit
request
- with the quiesce descriptionQuiesceRequest
if the request was approved by
the serverpublic QuiesceResult quiesceUnsafe(QuiesceRequest request) throws IOException, QuiesceFailedException
request
- IOException
QuiesceFailedException
public void unquiesce(QuiesceRequest request)
ProcessingUnit
ProcessingUnit.waitFor(com.gigaspaces.admin.quiesce.QuiesceState)
returned true) all space instances and
listeners will switch to unquiesced mode. If the GSM rejects the request an exception with
the rejection failure will be thrown. (precondition: the processing unit is intact)unquiesce
in interface ProcessingUnit
request
- with the quiesce descriptionpublic boolean waitFor(QuiesceState desiredState, long timeout, TimeUnit timeUnit)
waitFor
in interface ProcessingUnit
true
if the processing unit reached to desired as well as all instances in
the requested timeout, false
otherwise.public boolean waitFor(QuiesceState desiredState)
ProcessingUnit
ProcessingUnit.waitFor(com.gigaspaces.admin.quiesce.QuiesceState, long,
java.util.concurrent.TimeUnit)
but with endless timeoutwaitFor
in interface ProcessingUnit
public QuiesceDetails getQuiesceDetails()
getQuiesceDetails
in interface ProcessingUnit
QuiesceDetails
public String getArchiveName()
getArchiveName
in interface ProcessingUnit
public void scaleHorizontal(int target, String memory, String cpu)
scaleHorizontal
in interface InternalProcessingUnit
public void cancelScaleOut() throws IOException, InterruptedException, TimeoutException
cancelScaleOut
in interface InternalProcessingUnit
IOException
InterruptedException
TimeoutException
public void scaleVertical(String memory, String cpu, Long timeout, PuScaleVStatusChangedEventListener listener)
scaleVertical
in interface InternalProcessingUnit
public ClusterTopology getClusterTopology() throws IOException
getClusterTopology
in interface InternalProcessingUnit
IOException
public SharedLock lock() throws IOException, TimeoutException, InterruptedException
lock
in interface InternalProcessingUnit
IOException
TimeoutException
InterruptedException
public SharedLock lock(long timeout, TimeUnit timeunit) throws IOException, TimeoutException, InterruptedException
lock
in interface InternalProcessingUnit
IOException
TimeoutException
InterruptedException
public void setStub(boolean stub)
setStub
in interface InternalProcessingUnit
stub
- - true if PU was created before any instancepublic boolean isStub()
isStub
in interface InternalProcessingUnit
public void updateStub(ProcessingUnitInstance processingUnitInstance)
updateStub
in interface InternalProcessingUnit
Copyright © GigaSpaces.