|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Fires CapacityChangedEvents
Nested Class Summary | |
static class |
CapacityMonitor.BasicCapacityMonitor
A CapacityMonitor holds percentage values for some resource that has a capacity - e.g. |
Method Summary | |
void |
addCapacityEventListener(CapacityMonitorEventListener l)
Add a CapacityMonitorEventListener |
CapacityMonitorEvent |
generateCapacityMonitorEvent()
|
int |
getCurrentCapacity()
Get the current capacity of the service as a percentage |
long |
getCurrentValue()
Get the current value of the CapacityMonitor |
String |
getName()
Get the name of the CapacityMonitor |
int |
getRoundedCapacity()
Calculates the capacity rounded down to the rounding factor |
int |
getRoundingFactor()
Get the rounding factor - default is 10 |
long |
getValueLimit()
|
void |
removeCapacityEventListener(CapacityMonitorEventListener l)
Remove a CapacityMonitorEventListener |
void |
setCurrentValue(long newCurrentValue)
set the current value of the capacity |
void |
setName(String newName)
Set the name of the CapacityMonitor |
void |
setRoundingFactor(int newRoundingFactor)
Set the rounding factor (between 1-100) |
void |
setValueLimit(long newValueLimit)
set a new value limit for the CapacityMonitor |
Method Detail |
public String getName()
public void setName(String newName)
newName
- public int getRoundingFactor()
public void setRoundingFactor(int newRoundingFactor)
newRoundingFactor
- public void addCapacityEventListener(CapacityMonitorEventListener l)
l
- public void removeCapacityEventListener(CapacityMonitorEventListener l)
l
- public int getCurrentCapacity()
public int getRoundedCapacity()
public long getCurrentValue()
public void setCurrentValue(long newCurrentValue)
newCurrentValue
- public long getValueLimit()
public void setValueLimit(long newValueLimit)
newValueLimit
- public CapacityMonitorEvent generateCapacityMonitorEvent()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |