com.yahoo.ycsb
Class CounterGenerator

java.lang.Object
  extended by com.yahoo.ycsb.Generator
      extended by com.yahoo.ycsb.IntegerGenerator
          extended by com.yahoo.ycsb.CounterGenerator

public class CounterGenerator
extends IntegerGenerator

Generates a sequence of integers 0, 1, ...


Constructor Summary
CounterGenerator(int countstart)
          Create a counter that starts at countstart
 
Method Summary
 int nextInt()
          If the generator returns numeric (integer) values, return the next value as an int.
 
Methods inherited from class com.yahoo.ycsb.IntegerGenerator
lastInt, lastString, nextString, setLastInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterGenerator

public CounterGenerator(int countstart)
Create a counter that starts at countstart

Method Detail

nextInt

public int nextInt()
If the generator returns numeric (integer) values, return the next value as an int. Default is to return -1, which is appropriate for generators that do not return numeric values.

Specified by:
nextInt in class IntegerGenerator