BasicCapacityMonitor (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.capacity.BasicCapacityMonitor class

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.capacity
Class BasicCapacityMonitor

    java.lang.Object
      org.codehaus.activemq.capacity.BasicCapacityMonitor

All Implemented Interfaces:
  CapacityMonitor

Direct Known Subclasses:
  MemoryBoundedQueueManager

public class BasicCapacityMonitor
extends Object
implements CapacityMonitor

BasicCapacityMonitor implementation

Version:
  $Revision: 1.2 $

Nested Class Summary

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

Constructor Summary
`BasicCapacityMonitor(String name, long valueLimit)` Construct a CapacityMonitor

Method Summary
`void` | `addCapacityEventListener(CapacityMonitorEventListener l)` Add a CapacityMonitorEventListener
`int` | `getCurrentCapacity()` Get the current capscity of the service as a percentage
`long` | `getCurrentValue()` Get the current value of the CapacityMonitor
`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(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

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

Constructor Detail

### BasicCapacityMonitor

    public BasicCapacityMonitor(String name,
                                long valueLimit)

  Construct a CapacityMonitor

Parameters:
  `name` -
  `valueLimit` -

Method Detail

### getName

    public String getName()

  Get the name of the CapacityMonitor

  Specified by:
    `getName` in interface `CapacityMonitor`
  Returns:

### setName

    public void setName(String newName)

  Description copied from interface: `CapacityMonitor`
  Set the name of the CapacityMonitor

  Specified by:
    `setName` in interface `CapacityMonitor`
  Parameters:
    `newName` -

### getRoundingFactor

    public int getRoundingFactor()

  Get the rounding factor - default is 10

  Specified by:
    `getRoundingFactor` in interface `CapacityMonitor`
  Returns:
    the rounding factor

### setRoundingFactor

    public void setRoundingFactor(int newRoundingFactor)

  Set the rounding factor (between 1-100)

  Specified by:
    `setRoundingFactor` in interface `CapacityMonitor`
  Parameters:
    `newRoundingFactor` -

### addCapacityEventListener

    public void addCapacityEventListener(CapacityMonitorEventListener l)

  Add a CapacityMonitorEventListener

  Specified by:
    `addCapacityEventListener` in interface `CapacityMonitor`
  Parameters:
    `l` -

### removeCapacityEventListener

    public void removeCapacityEventListener(CapacityMonitorEventListener l)

  Remove a CapacityMonitorEventListener

  Specified by:
    `removeCapacityEventListener` in interface `CapacityMonitor`
  Parameters:
    `l` -

### getCurrentCapacity

    public int getCurrentCapacity()

  Get the current capscity of the service as a percentage

  Specified by:
    `getCurrentCapacity` in interface `CapacityMonitor`
  Returns:

### getRoundedCapacity

    public int getRoundedCapacity()

  Calculates the capacity rounded down to the rounding factor

  Specified by:
    `getRoundedCapacity` in interface `CapacityMonitor`
  Returns:

### getCurrentValue

    public long getCurrentValue()

  Get the current value of the CapacityMonitor

  Specified by:
    `getCurrentValue` in interface `CapacityMonitor`
  Returns:

### setCurrentValue

    public void setCurrentValue(long newCurrentValue)

  set the current value of the capacity

  Specified by:
    `setCurrentValue` in interface `CapacityMonitor`
  Parameters:
    `newCurrentValue` -

### getValueLimit

    public long getValueLimit()

  Specified by:
    `getValueLimit` in interface `CapacityMonitor`
  Returns:
    The upper limit of the value of the CapacityMonitor

### setValueLimit

    public void setValueLimit(long newValueLimit)

  set a new value limit for the CapacityMonitor

  Specified by:
    `setValueLimit` in interface `CapacityMonitor`
  Parameters:
    `newValueLimit` -

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.