|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.yahoo.ycsb.Generator
com.yahoo.ycsb.DiscreteGenerator
public class DiscreteGenerator
Generates a distribution by choosing from a discrete set of values.
| Constructor Summary | |
|---|---|
DiscreteGenerator()
|
|
| Method Summary | |
|---|---|
void |
addValue(double weight,
java.lang.String value)
|
java.lang.String |
lastString()
Return the previous string generated by the distribution; e.g., returned from the last nextString() call. |
int |
nextInt()
If the generator returns numeric (integer) values, return the next value as an int. |
java.lang.String |
nextString()
Generate the next string in the distribution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiscreteGenerator()
| Method Detail |
|---|
public java.lang.String nextString()
nextString in class Generator
public int nextInt()
throws WorkloadException
WorkloadException - if this generator does not support integer valuespublic java.lang.String lastString()
lastString in class Generator
public void addValue(double weight,
java.lang.String value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||