org.terracotta.counter
Interface RateCounter

All Superinterfaces:
Statistic
All Known Implementing Classes:
RateCounterImpl

public interface RateCounter
extends Statistic

A simple long based rate counter.


Method Summary
 void decrement(long numerator, long denominator)
          Decrement the numerator and denominator by the given amounts.
 void increment(long numerator, long denominator)
          Increment the numerator and denominator by the given amounts.
 void setDenominatorValue(long newValue)
          Set the denominator to the given value.
 void setNumeratorValue(long newValue)
          Set the numerator to the given value.
 void setValue(long numerator, long denominator)
          Set the numerator and denominator to the given values.
 
Methods inherited from interface org.terracotta.counter.Statistic
getAndReset, getValue
 

Method Detail

increment

void increment(long numerator,
               long denominator)
Increment the numerator and denominator by the given amounts.


decrement

void decrement(long numerator,
               long denominator)
Decrement the numerator and denominator by the given amounts.


setValue

void setValue(long numerator,
              long denominator)
Set the numerator and denominator to the given values.

Parameters:
numerator - new numerator value
denominator - new denominator value

setNumeratorValue

void setNumeratorValue(long newValue)
Set the numerator to the given value.

Parameters:
newValue - new numerator value

setDenominatorValue

void setDenominatorValue(long newValue)
Set the denominator to the given value.

Parameters:
newValue - new denominator value


Copyright © 2015 Terracotta, Inc.. All Rights Reserved.