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