Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.2 $

Nested Class Summary

Nested classes inherited from class org.codehaus.activemq.capacity.CapacityMonitor
`CapacityMonitor.BasicCapacityMonitor`

Field Summary
`(package private) SynchronizedLong` | `totalMemoryUsedSize`

Constructor Summary
`MemoryBoundedQueueManager(java.lang.String name, long maxSize)`

Method Summary
`void` | `close()` close this queue manager and all associated MemoryBoundedQueues
`(package private) int` | `decrementMemoryUsed(Packet obj)`
`protected void` | `finalize()`
`MemoryBoundedQueue` | `getMemoryBoundedQueue(java.lang.String name)` retrieve a named MemoryBoundedQueue or creates one if not found
`long` | `getTotalMemoryUsedSize()`
`(package private) int` | `incrementMemoryUsed(Packet obj)`
`boolean` | `isFull()`
`(package private) void` | `removeMemoryBoundedQueue(java.lang.String name)`

Methods inherited from class org.codehaus.activemq.capacity.BasicCapacityMonitor
`addCapacityEventListener, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### totalMemoryUsedSize

    SynchronizedLong totalMemoryUsedSize

Constructor Detail

### MemoryBoundedQueueManager

    public MemoryBoundedQueueManager(java.lang.String name,
                                     long maxSize)

Parameters:
  `name` -
  `maxSize` -

Method Detail

### getMemoryBoundedQueue

    public MemoryBoundedQueue getMemoryBoundedQueue(java.lang.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

### incrementMemoryUsed

    int incrementMemoryUsed(Packet obj)

### decrementMemoryUsed

    int decrementMemoryUsed(Packet obj)

### finalize

    protected void finalize()

### removeMemoryBoundedQueue

    void removeMemoryBoundedQueue(java.lang.String name)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.