|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.watch.Watch
org.rioproject.watch.ThresholdWatch
org.rioproject.watch.PeriodicWatch
org.rioproject.system.measurable.MeasurableCapability
public abstract class MeasurableCapability
A MeasurableCapability refers to a depletion oriented resource or capability on a ComputeResource
| Field Summary | |
|---|---|
protected MeasuredResource |
lastMeasured
|
protected MeasurableMonitor |
monitor
The MeasurableMonitor to use |
protected int |
sampleSize
The sampleSize property specifies the amount of samples the MeasurableCapability will accumulate in the period defined by the reportRate in order to produce a result. |
| Fields inherited from class org.rioproject.watch.PeriodicWatch |
|---|
DEFAULT_PERIOD |
| Fields inherited from class org.rioproject.watch.Watch |
|---|
COMPONENT, DEFAULT_VIEW, id, localRef, logger, watchDataSource |
| Constructor Summary | |
|---|---|
protected |
MeasurableCapability(String id,
String componentName,
Configuration config)
|
| Method Summary | |
|---|---|
void |
addSecondaryThresholdManager(ThresholdManager thresholdManager)
Add a secondary ThresholdManager to the MeasurableCapability. |
void |
addWatchRecord(Calculable record)
Add a Calculable to the watch and update state |
ResourceCost |
calculateResourceCost(double units,
long duration)
Calculate the cost based on the units provided. |
Configuration |
getConfiguration()
Get the Configuration property |
MeasuredResource |
getMeasuredResource()
Get the MeasuredResource object, which represents this object's measured capability |
Observable |
getObservable()
Get the Observable instance |
int |
getSampleSize()
Get the sampleSize property |
SLA |
getSLA()
Get the SLA for ths MeasurableCapability. |
protected Collection<ThresholdManager> |
getThresholdManagers()
Get the registered ThresholdManagers |
boolean |
isEnabled()
Get is this measurable capability is enabled |
void |
removeSecondaryThresholdManager(ThresholdManager thresholdManager)
Remove a secondary ThresholdManager from the MeasurableCapability |
protected void |
setEnabled(boolean enabled)
|
protected void |
setLastMeasuredResource(MeasuredResource lastMeasured)
|
void |
setMeasurableMonitor(MeasurableMonitor monitor)
Set the MeasurableMonitor |
void |
setResourceCostModel(ResourceCostModel costModel)
Set the ResourceCostModel for the MeasurableCapability |
void |
setSampleSize(int sampleSize)
Set the sampleSize for the MeasurableCapability |
void |
setSLA(SLA sla)
Set the SLA for ths MeasurableCapability. |
void |
setWatchDataSource(WatchDataSource watchDataSource)
Override parent's setWatchDataSource to set the size |
| Methods inherited from class org.rioproject.watch.PeriodicWatch |
|---|
getPeriod, setPeriod, start, stop |
| Methods inherited from class org.rioproject.watch.ThresholdWatch |
|---|
addThresholdListener, getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdManager, getThresholdValues, removeThresholdListener, setCurrentHighThreshold, setCurrentLowThreshold, setThresholdValues |
| Methods inherited from class org.rioproject.watch.Watch |
|---|
clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, main, setView, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.rioproject.system.measurable.MeasurableCapabilityMBean |
|---|
getUtilization |
| Methods inherited from interface org.rioproject.watch.PeriodicWatchMBean |
|---|
checkValue, getPeriod, setPeriod, start, stop |
| Methods inherited from interface org.rioproject.watch.ThresholdWatchMBean |
|---|
getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, setCurrentHighThreshold, setCurrentLowThreshold |
| Methods inherited from interface org.rioproject.watch.WatchMBean |
|---|
clear, getCalculables, getId, getLastCalculableValue |
| Field Detail |
|---|
protected int sampleSize
protected MeasurableMonitor monitor
MeasurableMonitor to use
protected MeasuredResource lastMeasured
| Constructor Detail |
|---|
protected MeasurableCapability(String id,
String componentName,
Configuration config)
| Method Detail |
|---|
protected void setEnabled(boolean enabled)
public boolean isEnabled()
public Configuration getConfiguration()
public void setWatchDataSource(WatchDataSource watchDataSource)
setWatchDataSource in class WatchwatchDataSource - The new WatchDataSource. The WatchDataSource will
have the id, configuration and view properties injected, and will also
be initialized.public void setSLA(SLA sla)
sla - The SLA for this MeasurableCapabilitypublic SLA getSLA()
public void setSampleSize(int sampleSize)
MeasurableCapabilityMBean
setSampleSize in interface MeasurableCapabilityMBeansampleSize - The number of samples the MeasurableCapability will
accumulate in the period defined by the period in order to produce a
result.MeasurableCapabilityMBean.setSampleSize(int)public int getSampleSize()
MeasurableCapabilityMBean
getSampleSize in interface MeasurableCapabilityMBeanMeasurableCapabilityMBean.getSampleSize()public void addSecondaryThresholdManager(ThresholdManager thresholdManager)
thresholdManager - The ThresholdManagerpublic void removeSecondaryThresholdManager(ThresholdManager thresholdManager)
thresholdManager - The ThresholdManagerpublic void setResourceCostModel(ResourceCostModel costModel)
costModel - The ResourceCostModel which will determine the cost of
using this MeasurableCapability
public ResourceCost calculateResourceCost(double units,
long duration)
ResourceCostProducer
calculateResourceCost in interface ResourceCostProducerunits - The units to be costedduration - The amount of time in milliseconds the resource has
been used for
ResourceCostProducer.calculateResourceCost(double, long)public MeasuredResource getMeasuredResource()
protected void setLastMeasuredResource(MeasuredResource lastMeasured)
public void setMeasurableMonitor(MeasurableMonitor monitor)
MeasurableMonitor
monitor - The MeasurableMonitorpublic void addWatchRecord(Calculable record)
addWatchRecord in class ThresholdWatchrecord - A Calculable recordprotected Collection<ThresholdManager> getThresholdManagers()
ThresholdManagers
ThresholdManagers. A new unmodifiable collection is allocated each timepublic Observable getObservable()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||