ehcache

net.sf.ehcache.util.counter
Class CounterConfig

java.lang.Object
  extended by net.sf.ehcache.util.counter.CounterConfig
Direct Known Subclasses:
SampledCounterConfig

public class CounterConfig
extends Object

Config for a simple Counter

Since:
1.7
Author:
Abhishek Sanoujam

Constructor Summary
CounterConfig(long initialValue)
          Creates a config with the initial value
 
Method Summary
 Counter createCounter()
          Creates and returns a Counter based on the initial value
 long getInitialValue()
          Gets the initial value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterConfig

public CounterConfig(long initialValue)
Creates a config with the initial value

Parameters:
initialValue -
Method Detail

getInitialValue

public final long getInitialValue()
Gets the initial value

Returns:
the initial value of counters created by this config

createCounter

public Counter createCounter()
Creates and returns a Counter based on the initial value

Returns:
The counter created by this config

ehcache

Copyright 2001-2017, Terracotta, Inc.