|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yahoo.ycsb.DataStore
com.yahoo.ycsb.memcached.Memcached
public abstract class Memcached
A layer for accessing a database to be benchmarked. Each thread in the client will be given its own instance of whatever DB class is to be used in the test. This class should be constructed using a no-argument constructor, so we can load it dynamically. Any argument-based initialization should be done by init(). Note that YCSB does not make any use of the return codes returned by this class. Instead, it keeps a count of the return values and presents them to the user. The semantics of methods such as insert, update and delete vary from database to database. In particular, operations may or may not be durable once these methods commit, and some systems may return 'success' regardless of whether or not a tuple with a matching key existed before the call. Rather than dictate the exact semantics of these methods, we recommend you either implement them to match the database's default semantics, or the semantics of your target application. For the sake of comparison between experiments we also recommend you explain the semantics you chose when presenting performance results.
Constructor Summary | |
---|---|
Memcached()
|
Method Summary | |
---|---|
abstract int |
add(java.lang.String key,
java.lang.Object value)
Add a value in the database. |
abstract int |
append(java.lang.String key,
long cas,
java.lang.Object value)
Append a value in the database. |
abstract int |
cas(java.lang.String key,
long cas,
java.lang.Object value)
Does a Create and store operation. |
abstract int |
decr(java.lang.String key,
java.lang.Object value)
Decrement a value in the database. |
abstract int |
delete(java.lang.String key)
Delete a value from the database. |
abstract int |
get(java.lang.String key,
java.lang.Object value)
Get a value from the database. |
abstract long |
gets(java.lang.String key)
Get a CAS identifier for a value in the database |
abstract int |
incr(java.lang.String key,
java.lang.Object value)
Increment a value in the database. |
abstract int |
prepend(java.lang.String key,
long cas,
java.lang.Object value)
Prepends a value to a specific keys current value |
abstract int |
replace(java.lang.String key,
java.lang.Object value)
Replaces the current value of a key if the key already exists |
abstract int |
set(java.lang.String key,
java.lang.Object value)
Set a record in the database. |
Methods inherited from class com.yahoo.ycsb.DataStore |
---|
cleanup, getProperties, init, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Memcached()
Method Detail |
---|
public abstract int add(java.lang.String key, java.lang.Object value)
key
- The key of the value to add.value
- An Object to use as the key's value
public abstract int append(java.lang.String key, long cas, java.lang.Object value)
key
- The key of the value to be appended to.cas
- The cas value needed to do the appendvalue
- An Object to use as the key's value
public abstract int cas(java.lang.String key, long cas, java.lang.Object value)
key
- The key of the value to do the cas.cas
- The cas value needed to do the appendvalue
- An Object to use as the key's value
public abstract int decr(java.lang.String key, java.lang.Object value)
key
- The key of the value to be decremented.value
- An Object to use as the key's value
public abstract int delete(java.lang.String key)
key
- The key of the value to be deleted.
public abstract int incr(java.lang.String key, java.lang.Object value)
key
- The key of the value to be incremented.value
- An Object to use as the key's value
public abstract int get(java.lang.String key, java.lang.Object value)
key
- The key of the value to get.value
- The Object that the key should contain
public abstract long gets(java.lang.String key)
key
- The key of the value to get a CAS identifier for
public abstract int prepend(java.lang.String key, long cas, java.lang.Object value)
key
- The key of the value to prepend.value
- The Object to prepend to the current key
public abstract int replace(java.lang.String key, java.lang.Object value)
key
- The key of the value to replace.cas
- The cas value needed to do the appendvalue
- The Object to replace the old value with
public abstract int set(java.lang.String key, java.lang.Object value)
key
- The key of the value to insert.value
- An Object to use as the key's value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |