public class RequestActiveReplicas extends ClientReconfigurationPacket implements ReplicableRequest
Modifier and Type | Class and Description |
---|---|
static class |
RequestActiveReplicas.Keys |
ClientReconfigurationPacket.ResponseCodes
ReconfigurationPacket.PacketType
Modifier and Type | Field and Description |
---|---|
static Stringifiable<java.net.InetSocketAddress> |
unstringer
Unstringer for InetSocketAddress of sender.
|
epochNumber, serviceName
clientPacketTypes, HANDLER_METHOD_PREFIX, PACKET_TYPE, serverPacketTypes
type
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, setResponseMessage
getEpochNumber, getServiceName
assertPacketTypeChecks, assertPacketTypeChecks, assertPacketTypeChecks, assertPacketTypeChecks, concatenate, getMessage, getPacketType, getPacketTypeCanonicalClassName, getPacketTypeClass, getPacketTypeClassName, getReconfigurationPacket, getReconfigurationPacket, getReconfigurationPacketSuppressExceptions, getReconfigurationPacketSuppressExceptions, getReconfigurationPacketType, getReconfigurationPacketType, isReconfigurationPacket, putPacketType, toBytes, toString
flip, getInitiator, getKey, getSender, getType, setKey, setSender, setType, toJSONObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setNeedsCoordination
getRequestType, getServiceName, toBytes, toString
getSummary
public 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.JSONException
public RequestActiveReplicas(org.json.JSONObject json) throws org.json.JSONException
json
- org.json.JSONException
public org.json.JSONObject toJSONObjectImpl() throws org.json.JSONException
toJSONObjectImpl
in class ClientReconfigurationPacket
org.json.JSONException
public 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()
RequestIdentifier
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. 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 RequestIdentifier
public boolean needsCoordination()
needsCoordination
in interface ReplicableRequest
public RequestActiveReplicas setNeedsCoordination()
this
with needsCoordination=truepublic RequestActiveReplicas unsetNeedsCoordination()
this
with needsCoordination=falsepublic java.lang.String getSummary()
Summarizable
getSummary
in interface Request
getSummary
in interface Summarizable
getSummary
in class ClientReconfigurationPacket