net.i2p.stat

## Class FrequencyStat

- java.lang.Object
- - net.i2p.stat.FrequencyStat

    public class FrequencyStat
    extends Object

coordinate an event frequency over various periods

### Constructor Summary

Constructors
Constructor and Description
`FrequencyStat(String name, String description, String group, long[] periods)`

### Method Summary

Methods
`void` `coalesceStats()` coalesce all the stats
`boolean` `equals(Object obj)`
`void` `eventOccurred()` update all of the frequencies for the various periods
`String` `getDescription()`
`long` `getEventCount()`
`long` `getFrequency()`
`Frequency` `getFrequency(long period)`
`String` `getGroupName()`
`String` `getName()`
`long[]` `getPeriods()`
`int` `hashCode()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FrequencyStat

    public FrequencyStat(String name,
                 String description,
                 String group,
                 long[] periods)

### Method Detail

#### eventOccurred

    public void eventOccurred()

update all of the frequencies for the various periods

#### coalesceStats

    public void coalesceStats()

coalesce all the stats

#### getName

    public String getName()

#### getGroupName

    public String getGroupName()

#### getDescription

    public String getDescription()

#### getPeriods

    public long[] getPeriods()

#### getFrequency

    public Frequency getFrequency(long period)

#### getEventCount

    public long getEventCount()

Returns:
  lifetime event count
Since:
  0.8.2

#### getFrequency

    public long getFrequency()

Returns:
  lifetime average frequency in millisedonds, i.e. the average time between events, or Long.MAX_VALUE if no events ever
Since:
  0.8.2

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`
Since:
  0.8.2