|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.capacity.BasicCapacityMonitor
public class BasicCapacityMonitor
BasicCapacityMonitor implementation
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.activemq.capacity.CapacityMonitor |
|---|
CapacityMonitor.BasicCapacityMonitor |
| Constructor Summary | |
|---|---|
BasicCapacityMonitor(String name,
long valueLimit)
Construct a CapacityMonitor |
|
| Method Summary | |
|---|---|
void |
addCapacityEventListener(CapacityMonitorEventListener l)
Add a CapacityMonitorEventListener |
CapacityMonitorEvent |
generateCapacityMonitorEvent()
|
int |
getCurrentCapacity()
Get the current capscity 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicCapacityMonitor(String name,
long valueLimit)
name - valueLimit - | Method Detail |
|---|
public String getName()
getName in interface CapacityMonitorpublic void setName(String newName)
CapacityMonitor
setName in interface CapacityMonitornewName - public int getRoundingFactor()
getRoundingFactor in interface CapacityMonitorpublic void setRoundingFactor(int newRoundingFactor)
setRoundingFactor in interface CapacityMonitornewRoundingFactor - public void addCapacityEventListener(CapacityMonitorEventListener l)
addCapacityEventListener in interface CapacityMonitorl - public void removeCapacityEventListener(CapacityMonitorEventListener l)
removeCapacityEventListener in interface CapacityMonitorl - public int getCurrentCapacity()
getCurrentCapacity in interface CapacityMonitorpublic int getRoundedCapacity()
getRoundedCapacity in interface CapacityMonitorpublic long getCurrentValue()
getCurrentValue in interface CapacityMonitorpublic void setCurrentValue(long newCurrentValue)
setCurrentValue in interface CapacityMonitornewCurrentValue - public long getValueLimit()
getValueLimit in interface CapacityMonitorpublic void setValueLimit(long newValueLimit)
setValueLimit in interface CapacityMonitornewValueLimit - public CapacityMonitorEvent generateCapacityMonitorEvent()
generateCapacityMonitorEvent in interface CapacityMonitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||