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.mule.util.counters.impl
Class AbstractCounter

    java.lang.Object
      org.mule.util.counters.impl.AbstractCounter

All Implemented Interfaces:
  Counter

Direct Known Subclasses:
  AggregateCounter, Number

    public abstract class AbstractCounter

extends Object
implements Counter

Constructor Summary
`AbstractCounter(String name, CounterFactory.Type type)`

Method Summary
`protected void` | `addAggregate(AggregateCounter counter)`
`abstract double` | `decrement()` Decrement the counter's value by 1.0.
`String` | `getName()` Accessor for the counter's name.
`CounterFactory.Type` | `getType()` Accessor for the counter type.
`abstract double` | `increment()` Increment the counter's value by 1.0.
`abstract double` | `incrementBy(double value)` Increment the counter's value by the specified amount.
`abstract double` | `nextValue()` Compute and return the value of the counter.
`protected void` | `propagate()`
`abstract void` | `setRawValue(double value)` Set the counter's value to a new value.

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

Constructor Detail

### AbstractCounter

    public AbstractCounter(String name,
                           CounterFactory.Type type)

Method Detail

### getType

    public CounterFactory.Type getType()

  Description copied from interface: `Counter`
  Accessor for the counter type.

  Specified by:
    `getType` in interface `Counter`
  Returns:
    the type of the counter

### getName

    public String getName()

  Description copied from interface: `Counter`
  Accessor for the counter's name.

  Specified by:
    `getName` in interface `Counter`
  Returns:
    the name of the counter

### increment

    public abstract double increment()

  Description copied from interface: `Counter`
  Increment the counter's value by 1.0.

  Specified by:
    `increment` in interface `Counter`
  Returns:
    the new value of the counter

### incrementBy

    public abstract double incrementBy(double value)

  Description copied from interface: `Counter`
  Increment the counter's value by the specified amount.

  Specified by:
    `incrementBy` in interface `Counter`
  Parameters:
    `value` - the amount to increment the counter by
  Returns:
    the new value of the counter

### decrement

    public abstract double decrement()

  Description copied from interface: `Counter`
  Decrement the counter's value by 1.0.

  Specified by:
    `decrement` in interface `Counter`
  Returns:
    the new value of the counter

### setRawValue

    public abstract void setRawValue(double value)

  Description copied from interface: `Counter`
  Set the counter's value to a new value.

  Specified by:
    `setRawValue` in interface `Counter`
  Parameters:
    `value` - the new value of the counter

### nextValue

    public abstract double nextValue()

  Description copied from interface: `Counter`
  Compute and return the value of the counter.

  Specified by:
    `nextValue` in interface `Counter`
  Returns:
    the value of the counter

### addAggregate

    protected void addAggregate(AggregateCounter counter)

### propagate

    protected void propagate()

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 © 2003-2009 MuleSource, Inc.. All Rights Reserved.