org.mule.util.counters.impl
Class AggregateCounter

java.lang.Object
  extended byorg.mule.util.counters.impl.AbstractCounter
      extended byorg.mule.util.counters.impl.AggregateCounter
All Implemented Interfaces:
Counter
Direct Known Subclasses:
Average, Delta, InstantRate, Max, Min, Operator, RatePerUnit, Sum, TimeAverage

public abstract class AggregateCounter
extends AbstractCounter


Constructor Summary
AggregateCounter(String name, CounterFactory.Type type, AbstractCounter base)
           
 
Method Summary
 void compute()
           
 double decrement()
          Decrement the counter's value by 1.0.
abstract  void doCompute()
           
 Counter getBase()
           
 double increment()
          Increment the counter's value by 1.0.
 double incrementBy(double value)
          Increment the counter's value by the specified amount.
abstract  double nextValue()
          Compute and return the value of the counter.
 void setRawValue(double value)
          Set the counter's value to a new value.
 
Methods inherited from class org.mule.util.counters.impl.AbstractCounter
addAggregate, getName, getType, propagate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateCounter

public AggregateCounter(String name,
                        CounterFactory.Type type,
                        AbstractCounter base)
Method Detail

increment

public double increment()
Description copied from interface: Counter
Increment the counter's value by 1.0.

Specified by:
increment in interface Counter
Specified by:
increment in class AbstractCounter

incrementBy

public double incrementBy(double value)
Description copied from interface: Counter
Increment the counter's value by the specified amount.

Specified by:
incrementBy in interface Counter
Specified by:
incrementBy in class AbstractCounter

decrement

public double decrement()
Description copied from interface: Counter
Decrement the counter's value by 1.0.

Specified by:
decrement in interface Counter
Specified by:
decrement in class AbstractCounter

setRawValue

public void setRawValue(double value)
Description copied from interface: Counter
Set the counter's value to a new value.

Specified by:
setRawValue in interface Counter
Specified by:
setRawValue in class AbstractCounter

compute

public final void compute()

getBase

public Counter getBase()

nextValue

public abstract double nextValue()
Description copied from interface: Counter
Compute and return the value of the counter.

Specified by:
nextValue in interface Counter
Specified by:
nextValue in class AbstractCounter

doCompute

public abstract void doCompute()


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.