public class RequestActiveReplicas extends ClientReconfigurationPacket implements ReplicableRequest
| Modifier and Type | Class and Description |
|---|---|
static class |
RequestActiveReplicas.Keys |
ClientReconfigurationPacket.ResponseCodesReconfigurationPacket.PacketType| Modifier and Type | Field and Description |
|---|---|
static Stringifiable<java.net.InetSocketAddress> |
unstringer
Unstringer for InetSocketAddress of sender.
|
epochNumber, serviceNameclientPacketTypes, HANDLER_METHOD_PREFIX, PACKET_TYPE, serverPacketTypestype| Constructor and Description |
|---|
RequestActiveReplicas(java.net.InetSocketAddress initiator,
java.lang.String name,
int epochNumber) |
RequestActiveReplicas(org.json.JSONObject json) |
RequestActiveReplicas(org.json.JSONObject json,
Stringifiable<?> unstringer) |
RequestActiveReplicas(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.net.InetSocketAddress> |
getActives() |
long |
getRequestID()
The uniqueness of this identifier across all requests to a replica group
is important for safety when
PaxosConfig.PC.PREVENT_DOUBLE_EXECUTION is
enabled as gigapaxos may otherwise assume that the duplicate request
identifier corresponds to a retransmission and will send back the
response if any corresponding to the first execution. |
java.lang.String |
getSummary()
Implementations are encouraged to return an inline created new Object()
whose toString() method will return the actual String instead of just
returning the String directly.
|
static void |
main(java.lang.String[] args) |
boolean |
needsCoordination() |
ClientReconfigurationPacket |
setActives(java.util.Set<java.net.InetSocketAddress> replicas) |
RequestActiveReplicas |
setNeedsCoordination() |
org.json.JSONObject |
toJSONObjectImpl() |
RequestActiveReplicas |
unsetNeedsCoordination() |
getCreateTime, getCreator, getForwader, getForwardee, getHashRCs, getMyReceiver, getRequestType, getResponseCode, getResponseMessage, isFailed, isForwardable, isForwarded, isRecursiveRedirectEnabled, isRedirectedResponse, isRequest, makeResponse, setFailed, setFailed, setForwader, setForwardee, setHashRCs, setRecursiveRedirect, setResponseMessagegetEpochNumber, getServiceNameassertPacketTypeChecks, assertPacketTypeChecks, assertPacketTypeChecks, assertPacketTypeChecks, concatenate, getMessage, getPacketType, getPacketTypeCanonicalClassName, getPacketTypeClass, getPacketTypeClassName, getReconfigurationPacket, getReconfigurationPacket, getReconfigurationPacketSuppressExceptions, getReconfigurationPacketSuppressExceptions, getReconfigurationPacketType, getReconfigurationPacketType, isReconfigurationPacket, putPacketType, toBytes, toStringflip, getInitiator, getKey, getSender, getType, setKey, setSender, setType, toJSONObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetNeedsCoordinationgetRequestType, getServiceName, toBytes, toStringgetSummarypublic static final Stringifiable<java.net.InetSocketAddress> unstringer
public RequestActiveReplicas(java.lang.String name)
name - public RequestActiveReplicas(java.net.InetSocketAddress initiator,
java.lang.String name,
int epochNumber)
initiator - name - epochNumber - public RequestActiveReplicas(org.json.JSONObject json,
Stringifiable<?> unstringer)
throws org.json.JSONException
json - unstringer - org.json.JSONExceptionpublic RequestActiveReplicas(org.json.JSONObject json)
throws org.json.JSONException
json - org.json.JSONExceptionpublic org.json.JSONObject toJSONObjectImpl()
throws org.json.JSONException
toJSONObjectImpl in class ClientReconfigurationPacketorg.json.JSONExceptionpublic ClientReconfigurationPacket setActives(java.util.Set<java.net.InetSocketAddress> replicas)
replicas - this with active replicas set to replicas.public java.util.Set<java.net.InetSocketAddress> getActives()
public static void main(java.lang.String[] args)
public long getRequestID()
RequestIdentifierPaxosConfig.PC.PREVENT_DOUBLE_EXECUTION is
enabled as gigapaxos may otherwise assume that the duplicate request
identifier corresponds to a retransmission and will send back the
response if any corresponding to the first execution. With
PaxosConfig.PC.PREVENT_DOUBLE_EXECUTION
disabled, the uniqueness is important for liveness as duplicate request
identifiers may result in the client not receiving a response for the
latter request; this is because gigapaxos stores request execution
callbacks indexed by the request identifier, so there must be at most one
outstanding request with a given identifier for a given replica group.getRequestID in interface RequestIdentifierpublic boolean needsCoordination()
needsCoordination in interface ReplicableRequestpublic RequestActiveReplicas setNeedsCoordination()
this with needsCoordination=truepublic RequestActiveReplicas unsetNeedsCoordination()
this with needsCoordination=falsepublic java.lang.String getSummary()
SummarizablegetSummary in interface RequestgetSummary in interface SummarizablegetSummary in class ClientReconfigurationPacket