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
Interface Counter

All Known Implementing Classes:
  AbstractCounter, AggregateCounter, Average, Delta, InstantRate, Max, Min, Number, Operator, RatePerUnit, Sum, TimeAverage

    public interface Counter

This interface is the interface implemented for all counter types. A Counter can represent a real counter or a virtual counter that will be computed using one or more other counters.

### Real counters

are counters which represent real values. The user will call methods of such counters to modify the associated value of the counter.

### Computed counters

are computed using one or more associated counters. Such counters represent operations computed on associated counters. Usually, these counters will never be used directly, but will only used to retrieve the computed values.

Method Summary
`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.
`double` | `increment()` Increment the counter's value by 1.0.
`double` | `incrementBy(double value)` Increment the counter's value by the specified amount.
`double` | `nextValue()` Compute and return the value of the counter.
`void` | `setRawValue(double value)` Set the counter's value to a new value.

Method Detail

### getType

    CounterFactory.Type getType()

  Accessor for the counter type.

  Returns:
    the type of the counter

### getName

    String getName()

  Accessor for the counter's name.

  Returns:
    the name of the counter

### increment

    double increment()

  Increment the counter's value by 1.0.

  Returns:
    the new value of the counter

### incrementBy

    double incrementBy(double value)

  Increment the counter's value by the specified amount.

  Parameters:
    `value` - the amount to increment the counter by
  Returns:
    the new value of the counter

### decrement

    double decrement()

  Decrement the counter's value by 1.0.

  Returns:
    the new value of the counter

### setRawValue

    void setRawValue(double value)

  Set the counter's value to a new value.

  Parameters:
    `value` - the new value of the counter

### nextValue

    double nextValue()

  Compute and return the value of the counter.

  Returns:
    the value of the counter

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.