|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CapacityMonitor
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 |
---|
String getName()
void setName(String newName)
newName
- int getRoundingFactor()
void setRoundingFactor(int newRoundingFactor)
newRoundingFactor
- void addCapacityEventListener(CapacityMonitorEventListener l)
l
- void removeCapacityEventListener(CapacityMonitorEventListener l)
l
- int getCurrentCapacity()
int getRoundedCapacity()
long getCurrentValue()
void setCurrentValue(long newCurrentValue)
newCurrentValue
- long getValueLimit()
void setValueLimit(long newValueLimit)
newValueLimit
- CapacityMonitorEvent generateCapacityMonitorEvent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |