org.activemq.io.util
Class MemoryBoundedObjectManager
java.lang.Object
org.activemq.capacity.BasicCapacityMonitor
org.activemq.io.util.MemoryBoundedObjectManager
- All Implemented Interfaces:
- CapacityMonitor
public class MemoryBoundedObjectManager
- extends BasicCapacityMonitor
Keeps track of MemoryBoundedObjects
- Version:
- $Revision: 1.1.1.1 $
Methods inherited from class org.activemq.capacity.BasicCapacityMonitor |
addCapacityEventListener, generateCapacityMonitorEvent, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit |
MemoryBoundedObjectManager
public MemoryBoundedObjectManager(String name,
long maxSize)
- Parameters:
name
- maxSize
-
MemoryBoundedObjectManager
public MemoryBoundedObjectManager(String name,
long maxSize,
boolean supportJMSPriority)
add
public void add(MemoryBoundedObject o)
close
public void close()
- close this queue manager and all associated MemoryBoundedQueues
remove
public void remove(MemoryBoundedObject o)
- Parameters:
name
-
getTotalMemoryUsedSize
public long getTotalMemoryUsedSize()
- Returns:
- the calculated total memory usage assocated with all it's queues
isFull
public boolean isFull()
- Returns:
- true if this MemoryBoundedObjectManager has reached it's predefined limit
getPercentFull
public float getPercentFull()
- Returns:
- true if this MemoryBoundedObjectManager has reached it's predefined limit
incrementMemoryUsed
public void incrementMemoryUsed(int size)
decrementMemoryUsed
public void decrementMemoryUsed(int size)
finalize
protected void finalize()
- Overrides:
finalize
in class Object
isSupportJMSPriority
public boolean isSupportJMSPriority()
- Returns:
- Returns the supportJMSPriority.
setSupportJMSPriority
public void setSupportJMSPriority(boolean supportJMSPriority)
- Parameters:
supportJMSPriority
- The supportJMSPriority to set.
Copyright © 2004-2009 Protique, Ltd.. All Rights Reserved.