public abstract class AbstractCounter extends Object implements Counter
Constructor and Description |
---|
AbstractCounter(String name,
CounterFactory.Type type) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAggregate(AggregateCounter counter) |
abstract double |
decrement()
Decrement the counter's value by 1.0.
|
String |
getName()
Gets the name of the object
|
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.
|
public AbstractCounter(String name, CounterFactory.Type type)
public CounterFactory.Type getType()
Counter
public String getName()
NamedObject
getName
in interface NamedObject
public abstract double increment()
Counter
public abstract double incrementBy(double value)
Counter
incrementBy
in interface Counter
value
- the amount to increment the counter bypublic abstract double decrement()
Counter
public abstract void setRawValue(double value)
Counter
setRawValue
in interface Counter
value
- the new value of the counterpublic abstract double nextValue()
Counter
protected void addAggregate(AggregateCounter counter)
protected void propagate()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.