twitter4j.management

## Class InvocationStatisticsCalculator

- java.lang.Object
- - twitter4j.management.InvocationStatisticsCalculator

All Implemented Interfaces:
  InvocationStatistics

    public class InvocationStatisticsCalculator
    extends Object
    implements InvocationStatistics

Object that collects/aggregates statistics for the invocation of a given method.

Author:
  Nick Dellamaggiore (nick.dellamaggiore at gmail.com)

### Constructor Summary

Constructors
Constructor and Description
`InvocationStatisticsCalculator(String name, int historySize)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getAverageTime()`
`long` `getCallCount()`
`long` `getErrorCount()`
`String` `getName()`
`long` `getTotalTime()`
`void` `reset()`
`String` `toString()`

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

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### InvocationStatisticsCalculator

    public InvocationStatisticsCalculator(String name,
                                          int historySize)

Parameters:
  `name` - the name of this API method
  `historySize` - the number of calls to track (for invocation time averaging)

### Method Detail

#### getName

    public String getName()

Specified by:
  `getName` in interface `InvocationStatistics`

#### getCallCount

    public long getCallCount()

Specified by:
  `getCallCount` in interface `InvocationStatistics`

#### getErrorCount

    public long getErrorCount()

Specified by:
  `getErrorCount` in interface `InvocationStatistics`

#### getTotalTime

    public long getTotalTime()

Specified by:
  `getTotalTime` in interface `InvocationStatistics`

#### getAverageTime

    public long getAverageTime()

Specified by:
  `getAverageTime` in interface `InvocationStatistics`

#### reset

    public void reset()

Specified by:
  `reset` in interface `InvocationStatistics`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`