Package bftsmart.demo.ycsb
Class YCSBMessage
- java.lang.Object
-
- bftsmart.demo.ycsb.YCSBMessage
-
- All Implemented Interfaces:
java.io.Serializable
public class YCSBMessage extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
YCSBMessage.Entity
static class
YCSBMessage.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
YCSBMessage.Entity
getEntity()
java.lang.String
getErrorMsg()
java.util.Set<java.lang.String>
getFields()
java.lang.String
getKey()
static YCSBMessage
getObject(byte[] theBytes)
int
getResult()
java.util.HashMap<java.lang.String,byte[]>
getResults()
java.lang.String
getTable()
YCSBMessage.Type
getType()
java.util.HashMap<java.lang.String,byte[]>
getValues()
static YCSBMessage
newErrorMessage(java.lang.String errorMsg)
static YCSBMessage
newInsertRequest(java.lang.String table, java.lang.String key, java.util.HashMap<java.lang.String,byte[]> values)
static YCSBMessage
newInsertResponse(int result)
static YCSBMessage
newReadRequest(java.lang.String table, java.lang.String key, java.util.Set<java.lang.String> fields, java.util.HashMap<java.lang.String,byte[]> results)
static YCSBMessage
newReadResponse(java.util.HashMap<java.lang.String,byte[]> results, int result)
static YCSBMessage
newUpdateRequest(java.lang.String table, java.lang.String key, java.util.HashMap<java.lang.String,byte[]> values)
static YCSBMessage
newUpdateResponse(int result)
java.lang.String
toString()
-
-
-
Method Detail
-
newInsertRequest
public static YCSBMessage newInsertRequest(java.lang.String table, java.lang.String key, java.util.HashMap<java.lang.String,byte[]> values)
-
newUpdateRequest
public static YCSBMessage newUpdateRequest(java.lang.String table, java.lang.String key, java.util.HashMap<java.lang.String,byte[]> values)
-
newReadRequest
public static YCSBMessage newReadRequest(java.lang.String table, java.lang.String key, java.util.Set<java.lang.String> fields, java.util.HashMap<java.lang.String,byte[]> results)
-
newInsertResponse
public static YCSBMessage newInsertResponse(int result)
-
newUpdateResponse
public static YCSBMessage newUpdateResponse(int result)
-
newReadResponse
public static YCSBMessage newReadResponse(java.util.HashMap<java.lang.String,byte[]> results, int result)
-
newErrorMessage
public static YCSBMessage newErrorMessage(java.lang.String errorMsg)
-
getBytes
public byte[] getBytes()
-
getObject
public static YCSBMessage getObject(byte[] theBytes)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getResult
public int getResult()
-
getResults
public java.util.HashMap<java.lang.String,byte[]> getResults()
-
getType
public YCSBMessage.Type getType()
-
getEntity
public YCSBMessage.Entity getEntity()
-
getTable
public java.lang.String getTable()
-
getKey
public java.lang.String getKey()
-
getFields
public java.util.Set<java.lang.String> getFields()
-
getValues
public java.util.HashMap<java.lang.String,byte[]> getValues()
-
getErrorMsg
public java.lang.String getErrorMsg()
-
-