orderedinserts = false;
} else {
orderedinserts = true;
}
keysequence = new CounterGenerator(insertstart);
operationchooser = new DiscreteGenerator();
if (Config.getConfig().memadd_proportion > 0) {
operationchooser.addValue(Config.getConfig().memadd_proportion, "ADD");
}
if (Config.getConfig().memappend_proportion > 0) {
operationchooser.addValue(Config.getConfig().memappend_proportion, "APPEND");
}
if (Config.getConfig().memcas_proportion > 0) {
operationchooser.addValue(Config.getConfig().memcas_proportion, "CAS");
}
if (Config.getConfig().memdecr_proportion > 0) {
operationchooser.addValue(Config.getConfig().memdecr_proportion, "DECR");
}
if (Config.getConfig().memdelete_proportion > 0) {
operationchooser.addValue(Config.getConfig().memdelete_proportion, "DELETE");
}
if (Config.getConfig().memget_proportion > 0) {
operationchooser.addValue(Config.getConfig().memget_proportion, "GET");
}
if (Config.getConfig().memgets_proportion > 0) {
operationchooser.addValue(Config.getConfig().memgets_proportion, "GETS");
}
if (Config.getConfig().memincr_proportion > 0) {
operationchooser.addValue(Config.getConfig().memincr_proportion, "INCR");
}
if (Config.getConfig().memprepend_proportion > 0) {
operationchooser.addValue(Config.getConfig().memprepend_proportion, "PREPEND");
}
if (Config.getConfig().memreplace_proportion > 0) {
operationchooser.addValue(Config.getConfig().memreplace_proportion, "REPLACE");
}
if (Config.getConfig().memset_proportion > 0) {
operationchooser.addValue(Config.getConfig().memset_proportion, "SET");
}
if (Config.getConfig().memupdate_proportion > 0) {
operationchooser.addValue(Config.getConfig().memupdate_proportion, "UPDATE");
}
transactioninsertkeysequence = new CounterGenerator(recordcount);
if (Config.getConfig().request_distribution.compareTo("uniform") == 0) {
keychooser = new UniformIntegerGenerator(0, recordcount - 1);
} else if (Config.getConfig().request_distribution.compareTo("zipfian") == 0) {
// it does this by generating a random "next key" in part by taking
// the modulus over the number of keys