public class DefaultProcessingUnits extends Object implements InternalProcessingUnits
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
Constructor and Description |
---|
DefaultProcessingUnits(InternalAdmin admin) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultProcessingUnits(InternalAdmin admin)
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public ProcessingUnitAddedEventManager getProcessingUnitAdded()
ProcessingUnits
ProcessingUnitAddedEventListener
s.getProcessingUnitAdded
in interface ProcessingUnits
public ProcessingUnitRemovedEventManager getProcessingUnitRemoved()
ProcessingUnits
ProcessingUnitRemovedEventListener
s.getProcessingUnitRemoved
in interface ProcessingUnits
public ManagingGridServiceManagerChangedEventManager getManagingGridServiceManagerChanged()
ProcessingUnits
ManagingGridServiceManagerChangedEvent
s occurring on any
processing unit.getManagingGridServiceManagerChanged
in interface ProcessingUnits
public BackupGridServiceManagerChangedEventManager getBackupGridServiceManagerChanged()
ProcessingUnits
BackupGridServiceManagerChangedEvent
s occurring on any
processing unit.getBackupGridServiceManagerChanged
in interface ProcessingUnits
public ProcessingUnitStatusChangedEventManager getProcessingUnitStatusChanged()
ProcessingUnits
ProcessingUnitSpaceCorrelatedEvent
s occurring on any
processing unit.getProcessingUnitStatusChanged
in interface ProcessingUnits
public ProcessingUnitInstanceAddedEventManager getProcessingUnitInstanceAdded()
ProcessingUnits
ProcessingUnitInstanceAddedEventListener
s.getProcessingUnitInstanceAdded
in interface ProcessingUnits
public ProcessingUnitInstanceRemovedEventManager getProcessingUnitInstanceRemoved()
ProcessingUnits
ProcessingUnitInstanceRemovedEventListener
s.getProcessingUnitInstanceRemoved
in interface ProcessingUnits
public Iterator<ProcessingUnit> iterator()
iterator
in interface Iterable<ProcessingUnit>
public ProcessingUnit[] getProcessingUnits()
ProcessingUnits
ProcessingUnit
s currently deployed.getProcessingUnits
in interface ProcessingUnits
public ProcessingUnitInstance[] getProcessingUnitInstances()
getProcessingUnitInstances
in interface InternalProcessingUnitInstancesAware
public ProcessingUnit getProcessingUnit(String name)
ProcessingUnits
ProcessingUnit
for the given processing unit
name.getProcessingUnit
in interface ProcessingUnits
public Map<String,ProcessingUnit> getNames()
ProcessingUnits
ProcessingUnit
keyed by their respective
names.getNames
in interface ProcessingUnits
public int getSize()
ProcessingUnits
ProcessingUnit
s.getSize
in interface ProcessingUnits
public boolean isEmpty()
ProcessingUnits
true
if there are no currently deployed processing units.isEmpty
in interface ProcessingUnits
public ProcessingUnit waitFor(String processingUnitName)
ProcessingUnits
ProcessingUnit
.waitFor
in interface ProcessingUnits
public ProcessingUnit waitFor(String processingUnitName, long timeout, TimeUnit timeUnit)
ProcessingUnits
ProcessingUnit
. Return
null
if the processing unit is not deployed within the specified timeout.waitFor
in interface ProcessingUnits
public void addLifecycleListener(ProcessingUnitLifecycleEventListener eventListener)
ProcessingUnits
ProcessingUnitLifecycleEventListener
.addLifecycleListener
in interface ProcessingUnits
public void removeLifecycleListener(ProcessingUnitLifecycleEventListener eventListener)
ProcessingUnits
ProcessingUnitLifecycleEventListener
.removeLifecycleListener
in interface ProcessingUnits
public void addLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
ProcessingUnits
ProcessingUnitInstanceLifecycleEventListener
.addLifecycleListener
in interface ProcessingUnits
public void removeLifecycleListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
ProcessingUnits
ProcessingUnitInstanceLifecycleEventListener
.removeLifecycleListener
in interface ProcessingUnits
public void addProcessingUnit(ProcessingUnit processingUnit)
addProcessingUnit
in interface InternalProcessingUnits
public void removeProcessingUnit(String name)
removeProcessingUnit
in interface InternalProcessingUnits
public ProcessingUnitInstanceStatisticsChangedEventManager getProcessingUnitInstanceStatisticsChanged()
ProcessingUnits
ProcessingUnitInstanceStatisticsChangedEvent
.
Note, in order to receive events, the virtual machines need to be in a "statistics" monitored state.
getProcessingUnitInstanceStatisticsChanged
in interface ProcessingUnits
public ProcessingUnitInstanceProvisionStatusChangedEventManager getProcessingUnitInstanceProvisionStatusChanged()
ProcessingUnits
ProcessingUnitInstanceProvisionStatusChangedEventListener
s.getProcessingUnitInstanceProvisionStatusChanged
in interface ProcessingUnits
public ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager getProcessingUnitInstanceMemberAliveIndicatorStatusChanged()
ProcessingUnits
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventListener
s.getProcessingUnitInstanceMemberAliveIndicatorStatusChanged
in interface ProcessingUnits
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 ElasticAutoScalingProgressChangedEventManager getElasticAutoScalingProgressChanged()
getElasticAutoScalingProgressChanged
in interface ProcessingUnits
ElasticAutoScalingProgressChangedEventListener
spublic ElasticAutoScalingFailureEventManager getElasticAutoScalingFailure()
getElasticAutoScalingFailure
in interface ProcessingUnits
ElasticAutoScalingFailureEventListener
spublic void processElasticScaleStrategyEvent(ElasticProcessingUnitEvent event)
InternalProcessingUnits
processElasticScaleStrategyEvent
in interface InternalProcessingUnits
public ProcessingUnit removeEmbeddedSpace(InternalSpace space)
InternalProcessingUnits
removeEmbeddedSpace
in interface InternalProcessingUnits
public Integer getPlannedNumberOfInstancesOfElasticPU(ProcessingUnit pu)
getPlannedNumberOfInstancesOfElasticPU
in interface InternalProcessingUnits
ProcessingUnit.getPlannedNumberOfInstances()
Copyright © GigaSpaces.