<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.db.SherpaClient</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>SherpaClient</B><DT>extends <A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL>
</PRE>
<P>
This is a Java Sherpa client to be used for the Benchmark app. Since Sherpa
is a RESful service, this class will make use of Apache's HttpClient 4.x to
<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TH>
throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE>
<DL>
<DD>Initialize any state for this DB. Called once per DB instance; there is
one DB instance per client thread.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="cleanup()"><!-- --></A><H3>
cleanup</H3>
<PRE>
public void <B>cleanup</B>()
throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE>
<DL>
<DD>Cleanup any state for this DB. Called once per DB instance; there is one
DB instance per client thread.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL>
<DD>Method to parse and store a JSON response from reading a single Sherpa
record into the corresponding HashMap key/value pairs.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>response</CODE> - JSONObject response from reading a single Sherpa record<DD><CODE>result</CODE> - HashMap key/value pairs for the record's field/values
<DT><B>Throws:</B>
<DD><CODE>JSONException</CODE> - If there is an error parsing the JSON response</DL>
<DD>Method to parse and store a JSON response from a hash scan request. This
consists of multiple records each of which will be stored in the input
result Vector as a HashMap of key/value pairs.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>curResult</CODE> - JSONObject response from a Sherpa hash scan request<DD><CODE>result</CODE> - Vector of Sherpa records each stored as a HashMap of
key/values for the record's field/values
<DT><B>Throws:</B>
<DD><CODE>JSONException</CODE> - If there is an error parsing the JSON response</DL>
<DD>Method to parse and store a JSON response from an ordered scan request.
This consists of multiple records each of which will be stored in the
input result Vector as a HashMap of key/value pairs.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>curResult</CODE> - JSONObject response from a Sherpa ordered scan request<DD><CODE>result</CODE> - Vector of Sherpa records each stored as a HashMap of
key/values for the record's field/values
<DT><B>Throws:</B>
<DD><CODE>JSONException</CODE> - If there is an error parsing the JSON response</DL>
public int <B>delete</B>(java.lang.String table,
java.lang.String key)</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">DB</A></CODE></B></DD>
<DD>Delete a record from the database.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete.
<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">DB</A></CODE></B></DD>
<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified
record key.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record
<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">DB</A></CODE></B></DD>
<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result
<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">DB</A></CODE></B></DD>
<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record
<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">DB</A></CODE></B></DD>
<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified
record key, overwriting any existing values with the same field name.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record
<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL>