public class ProposalPacket extends RequestPacket
RequestPacket.Keys, RequestPacket.ResponseCodes
PaxosPacket.NodeIDKeys, PaxosPacket.PaxosPacketType
Modifier and Type | Field and Description |
---|---|
protected static int |
SIZEOF_PROPOSAL |
int |
slot
Slot number assigned to the request.
|
digest, NO_OP, NULL_SOCKADDR, requestID, requestValue, SIZE_ESTIMATE, SIZEOF_REQUEST_FIXED, stop
BYTEIFICATION, CHARSET, packetType, paxosID, SIZEOF_PAXOSPACKET_FIXED, version
PACKET_TYPE, type
Modifier | Constructor and Description |
---|---|
protected |
ProposalPacket(java.nio.ByteBuffer bbuf) |
|
ProposalPacket(int slot,
RequestPacket req) |
|
ProposalPacket(org.json.JSONObject json) |
|
ProposalPacket(net.minidev.json.JSONObject json) |
protected |
ProposalPacket(ProposalPacket prop) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getSummaryString() |
byte[] |
toBytes()
The implementation of this method is tied to and must be the inverse of
AppRequestParser.getRequest(byte[], edu.umass.cs.nio.nioutils.NIOHeader)
, i.e., invoking getRequest(request.toBytes(), header).equals(request). |
org.json.JSONObject |
toJSONObjectImpl() |
net.minidev.json.JSONObject |
toJSONSmartImpl() |
addDebugInfo, addDebugInfo, addDebugInfo, addDebugInfoDeep, addDebugInfoDeep, batchSize, digestEquals, doubleCheckFields, equals, getACK, getBatched, getByteifiedSelf, getClientAddress, getClientID, getDebugInfo, getDigest, getEntryReplica, getEntryReplicaRequestsAsBatch, getEntryTime, getFirstOnly, getForwardCount, getForwarderID, getListenAddress, getMessageDigest, getNACK, getRandomPValue, getRequestID, getRequestPackets, getRequestType, getRequestValue, getRequestValues, getResponse, getSamplePValue, getServiceName, getStringifiedSelf, getSummary, hasRequestValue, isBroadcasted, isMetaValue, isNoop, isPingPonging, isPingPonging, isStopRequest, latchToBatch, lengthEstimate, main, makeNewRequest, makeNoop, printBatched, setBroadcasted, setByteifiedSelf, setDigest, setEntryReplica, setEntryReplicaAndReturnCount, setEntryTime, setForwarderID, setResponse, setReturnRequestValue, setStringifiedSelf, shouldBroadcast, shouldDigest, shouldReturnRequestValue, toBytes, toBytesInstrument, toString
getPaxosID, getPaxosIDVersion, getPaxosPacket, getPaxosPacket, getPaxosPacketType, getPaxosPacketType, getSummary, getType, getType, getVersion, isParseable, isRecovery, isRecovery, isStatic, markRecovered, putPaxosID, toBytes, toJSONObject, toJSONSmart, toSingletonArray
couldBeJSON, couldBeJSON, couldBeJSON, couldBeJSONArray, couldBeJSONObject, getPacketType, putPacketType, putPacketType
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSummary
public final int slot
protected static final int SIZEOF_PROPOSAL
public ProposalPacket(int slot, RequestPacket req)
protected ProposalPacket(ProposalPacket prop)
public ProposalPacket(org.json.JSONObject json) throws org.json.JSONException
org.json.JSONException
public ProposalPacket(net.minidev.json.JSONObject json) throws org.json.JSONException
org.json.JSONException
protected ProposalPacket(java.nio.ByteBuffer bbuf) throws java.io.UnsupportedEncodingException, java.net.UnknownHostException
java.io.UnsupportedEncodingException
java.net.UnknownHostException
public org.json.JSONObject toJSONObjectImpl() throws org.json.JSONException
toJSONObjectImpl
in class RequestPacket
org.json.JSONException
public net.minidev.json.JSONObject toJSONSmartImpl() throws org.json.JSONException
toJSONSmartImpl
in class RequestPacket
org.json.JSONException
public byte[] toBytes()
Request
AppRequestParser.getRequest(byte[], edu.umass.cs.nio.nioutils.NIOHeader)
, i.e., invoking getRequest(request.toBytes(), header).equals(request).protected java.lang.String getSummaryString()
getSummaryString
in class RequestPacket