|
|||||||||
| Home >> All >> org >> activemq >> [ capacity overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.activemq.capacity
Class BasicCapacityMonitor

java.lang.Objectorg.activemq.capacity.BasicCapacityMonitor
- All Implemented Interfaces:
- CapacityMonitor
- public class BasicCapacityMonitor
- extends java.lang.Object
- implements CapacityMonitor
- extends java.lang.Object
BasicCapacityMonitor implementation
- Version:
- $Revision: 1.1.1.1 $
| Nested Class Summary |
| Nested classes inherited from class org.activemq.capacity.CapacityMonitor |
CapacityMonitor.BasicCapacityMonitor |
| Field Summary | |
private int |
currentCapacity
|
private long |
currentValue
|
private CopyOnWriteArrayList |
listeners
|
private java.lang.String |
name
|
private int |
roundedCapacity
|
private int |
roundingFactor
|
private long |
valueLimit
|
| Constructor Summary | |
BasicCapacityMonitor(java.lang.String name,
long valueLimit)
Construct a CapacityMonitor |
|
| Method Summary | |
void |
addCapacityEventListener(CapacityMonitorEventListener l)
Add a CapacityMonitorEventListener |
private int |
calculateCapacity()
|
CapacityMonitorEvent |
generateCapacityMonitorEvent()
|
int |
getCurrentCapacity()
Get the current capscity of the service as a percentage |
long |
getCurrentValue()
Get the current value of the CapacityMonitor |
java.lang.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(java.lang.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 |
private void |
updateCapacityChanged(int newRoundedCapacity)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
name
private java.lang.String name
valueLimit
private long valueLimit
currentValue
private long currentValue
currentCapacity
private int currentCapacity
roundedCapacity
private int roundedCapacity
roundingFactor
private int roundingFactor
listeners
private CopyOnWriteArrayList listeners
| Constructor Detail |
BasicCapacityMonitor
public BasicCapacityMonitor(java.lang.String name, long valueLimit)
- Construct a CapacityMonitor
| Method Detail |
getName
public java.lang.String getName()
- Get the name of the CapacityMonitor
- Specified by:
getNamein interfaceCapacityMonitor
setName
public void setName(java.lang.String newName)
- Description copied from interface:
CapacityMonitor - Set the name of the CapacityMonitor
- Specified by:
setNamein interfaceCapacityMonitor
getRoundingFactor
public int getRoundingFactor()
- Get the rounding factor - default is 10
- Specified by:
getRoundingFactorin interfaceCapacityMonitor
setRoundingFactor
public void setRoundingFactor(int newRoundingFactor)
- Set the rounding factor (between 1-100)
- Specified by:
setRoundingFactorin interfaceCapacityMonitor
addCapacityEventListener
public void addCapacityEventListener(CapacityMonitorEventListener l)
- Add a CapacityMonitorEventListener
- Specified by:
addCapacityEventListenerin interfaceCapacityMonitor
removeCapacityEventListener
public void removeCapacityEventListener(CapacityMonitorEventListener l)
- Remove a CapacityMonitorEventListener
- Specified by:
removeCapacityEventListenerin interfaceCapacityMonitor
getCurrentCapacity
public int getCurrentCapacity()
- Get the current capscity of the service as a percentage
- Specified by:
getCurrentCapacityin interfaceCapacityMonitor
getRoundedCapacity
public int getRoundedCapacity()
- Calculates the capacity rounded down to the rounding factor
- Specified by:
getRoundedCapacityin interfaceCapacityMonitor
getCurrentValue
public long getCurrentValue()
- Get the current value of the CapacityMonitor
- Specified by:
getCurrentValuein interfaceCapacityMonitor
setCurrentValue
public void setCurrentValue(long newCurrentValue)
- set the current value of the capacity
- Specified by:
setCurrentValuein interfaceCapacityMonitor
getValueLimit
public long getValueLimit()
- Specified by:
getValueLimitin interfaceCapacityMonitor
setValueLimit
public void setValueLimit(long newValueLimit)
- set a new value limit for the CapacityMonitor
- Specified by:
setValueLimitin interfaceCapacityMonitor
generateCapacityMonitorEvent
public CapacityMonitorEvent generateCapacityMonitorEvent()
- Specified by:
generateCapacityMonitorEventin interfaceCapacityMonitor
updateCapacityChanged
private void updateCapacityChanged(int newRoundedCapacity)
calculateCapacity
private int calculateCapacity()
|
|||||||||
| Home >> All >> org >> activemq >> [ capacity overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.activemq.capacity.BasicCapacityMonitor