Top Description Fields Constructors Methods
net.sf.ehcache.util.counter

public Class CounterConfig

extends Object
Class Inheritance
Known Direct Subclasses
net.sf.ehcache.util.counter.sampled.SampledCounterConfig

Config for a simple Counter
Author
Abhishek Sanoujam
Since
1.7

Field Summary

Modifier and TypeField and Description
private final long

Constructor Summary

AccessConstructor and Description
public
CounterConfig(long initialValue)

Creates a config with the initial value

Method Summary

Modifier and TypeMethod and Description
public Counter

Returns:

The counter created by this config
createCounter
()

Creates and returns a Counter based on the initial value

public final long

Returns:

the initial value of counters created by this config
getInitialValue
()

Gets the initial value

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initialValueback to summary
private final long initialValue

Constructor Detail

CounterConfigback to summary
public CounterConfig(long initialValue)

Creates a config with the initial value

Method Detail

createCounterback to summary
public Counter createCounter()

Creates and returns a Counter based on the initial value

Returns:Counter

The counter created by this config

getInitialValueback to summary
public final long getInitialValue()

Gets the initial value

Returns:long

the initial value of counters created by this config