org.codehaus.activemq.message.util
Class MemoryBoundedQueueManager
java.lang.Object
org.codehaus.activemq.capacity.BasicCapacityMonitor
org.codehaus.activemq.message.util.MemoryBoundedQueueManager
- All Implemented Interfaces:
- CapacityMonitor
- public class MemoryBoundedQueueManager
- extends BasicCapacityMonitor
A factory manager for MemoryBoundedQueue and also ensures that the maximum memory used by all active
MemoryBoundedQueues cewated by this instance stays within the memory usage bounds set.
- Version:
- $Revision: 1.1 $
Methods inherited from class org.codehaus.activemq.capacity.BasicCapacityMonitor |
addCapacityEventListener, generateCapacityMonitorEvent, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit |
MemoryBoundedQueueManager
public MemoryBoundedQueueManager(String name,
long maxSize)
- Parameters:
name
- maxSize
-
getMemoryBoundedQueue
public MemoryBoundedQueue getMemoryBoundedQueue(String name)
- retrieve a named MemoryBoundedQueue or creates one if not found
- Parameters:
name
-
- Returns:
- an named instance of a MemoryBoundedQueue
close
public void close()
- close this queue manager and all associated MemoryBoundedQueues
getTotalMemoryUsedSize
public long getTotalMemoryUsedSize()
- Returns:
- the calculated total memory usage assocated with all it's queues
isFull
public boolean isFull()
- Returns:
- true if this MemoryBoundedQueueManager has reached it's predefined limit
finalize
protected void finalize()
Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.