Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.capacity
Interface CapacityMonitor  view CapacityMonitor download CapacityMonitor.java

All Known Implementing Classes:
BasicCapacityMonitor, DelegateCapacityMonitor

public interface CapacityMonitor

Fires CapacityChangedEvents

Version:
$Revision: 1.1.1.1 $

Nested Class Summary
static class CapacityMonitor.BasicCapacityMonitor
          A CapacityMonitor holds percentage values for some resource that has a capacity - e.g.
 
Method Summary
 void addCapacityEventListener(CapacityMonitorEventListener l)
          Add a CapacityMonitorEventListener
 CapacityMonitorEvent generateCapacityMonitorEvent()
           
 int getCurrentCapacity()
          Get the current capacity of the service as a percentage
 long getCurrentValue()
          Get the current value of the CapacityMonitor
 java.lang.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(java.lang.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
 

Method Detail

getName

public java.lang.String getName()
Get the name of the CapacityMonitor


setName

public void setName(java.lang.String newName)
Set the name of the CapacityMonitor


getRoundingFactor

public int getRoundingFactor()
Get the rounding factor - default is 10


setRoundingFactor

public void setRoundingFactor(int newRoundingFactor)
Set the rounding factor (between 1-100)


addCapacityEventListener

public void addCapacityEventListener(CapacityMonitorEventListener l)
Add a CapacityMonitorEventListener


removeCapacityEventListener

public void removeCapacityEventListener(CapacityMonitorEventListener l)
Remove a CapacityMonitorEventListener


getCurrentCapacity

public int getCurrentCapacity()
Get the current capacity of the service as a percentage


getRoundedCapacity

public int getRoundedCapacity()
Calculates the capacity rounded down to the rounding factor


getCurrentValue

public long getCurrentValue()
Get the current value of the CapacityMonitor


setCurrentValue

public void setCurrentValue(long newCurrentValue)
set the current value of the capacity


getValueLimit

public long getValueLimit()

setValueLimit

public void setValueLimit(long newValueLimit)
set a new value limit for the CapacityMonitor


generateCapacityMonitorEvent

public CapacityMonitorEvent generateCapacityMonitorEvent()