org.activemq.io.util
Class MemoryBoundedQueueManager
java.lang.Object
org.activemq.io.util.MemoryBoundedQueueManager
- public class MemoryBoundedQueueManager
- extends Object
A factory manager for MemoryBoundedQueue and also ensures that the maximum memory used by all active
MemoryBoundedQueues created by this instance stays within the memory usage bounds set.
- Version:
- $Revision: 1.1.1.1 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryBoundedQueueManager
public MemoryBoundedQueueManager(MemoryBoundedObjectManager memoryManager)
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
getMemoryManager
public MemoryBoundedObjectManager getMemoryManager()
- Returns:
- Returns the memoryManager.
getCurrentCapacity
public int getCurrentCapacity()
add
public void add(MemoryBoundedQueue queue)
remove
public void remove(MemoryBoundedQueue queue)
isFull
public boolean isFull()
incrementMemoryUsed
public void incrementMemoryUsed(int size)
decrementMemoryUsed
public void decrementMemoryUsed(int size)
getMemoryBoundedQueues
public List getMemoryBoundedQueues()
dumpContents
public String dumpContents()
setMemoryLimitEnforced
public void setMemoryLimitEnforced(boolean enable)
isMemoryLimitEnforced
public boolean isMemoryLimitEnforced()
Copyright © 2004-2007 Protique, Ltd.. All Rights Reserved.