NodeIDType
- public abstract class ServerReconfigurationPacket<NodeIDType> extends BasicReconfigurationPacket<NodeIDType> implements ReconfiguratorRequest
ReconfigurationPacket.PacketType
Modifier and Type | Field and Description |
---|---|
java.net.InetSocketAddress |
creator
Requester address to send the confirmation.
|
java.util.Set<NodeIDType> |
deletedNodes
Set of RC nodes being deleted.
|
java.util.Map<NodeIDType,java.net.InetSocketAddress> |
newlyAddedNodes
Map used for adding new RC nodes.
|
epochNumber, serviceName
clientPacketTypes, HANDLER_METHOD_PREFIX, PACKET_TYPE, serverPacketTypes
type
Constructor and Description |
---|
ServerReconfigurationPacket(org.json.JSONObject json,
Stringifiable<NodeIDType> unstringer) |
ServerReconfigurationPacket(NodeIDType initiator,
ReconfigurationPacket.PacketType type,
java.util.Map<NodeIDType,java.net.InetSocketAddress> newlyAddedNodes,
java.util.Set<NodeIDType> deletedNodes) |
ServerReconfigurationPacket(NodeIDType initiator,
ReconfigurationPacket.PacketType type,
NodeIDType nodeID,
java.net.InetSocketAddress sockAddr) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<NodeIDType> |
getAddedNodeIDs() |
java.util.Set<NodeIDType> |
getDeletedNodeIDs() |
java.net.InetSocketAddress |
getIssuer() |
java.net.InetSocketAddress |
getMyReceiver() |
IntegerPacketType |
getRequestType() |
java.lang.String |
getResponseMessage() |
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.
|
boolean |
hasAddedNodes() |
boolean |
hasDeletedNodes() |
boolean |
isFailed() |
ServerReconfigurationPacket<NodeIDType> |
setFailed() |
ServerReconfigurationPacket<NodeIDType> |
setResponseMessage(java.lang.String msg) |
org.json.JSONObject |
toJSONObjectImpl() |
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, toString, wait, wait, wait
getServiceName, toBytes, toString
getSummary
public final java.util.Map<NodeIDType,java.net.InetSocketAddress> newlyAddedNodes
public final java.util.Set<NodeIDType> deletedNodes
public final java.net.InetSocketAddress creator
public ServerReconfigurationPacket(NodeIDType initiator, ReconfigurationPacket.PacketType type, NodeIDType nodeID, java.net.InetSocketAddress sockAddr)
initiator
- type
- nodeID
- sockAddr
- public ServerReconfigurationPacket(NodeIDType initiator, ReconfigurationPacket.PacketType type, java.util.Map<NodeIDType,java.net.InetSocketAddress> newlyAddedNodes, java.util.Set<NodeIDType> deletedNodes)
initiator
- type
- newlyAddedNodes
- deletedNodes
- public ServerReconfigurationPacket(org.json.JSONObject json, Stringifiable<NodeIDType> unstringer) throws org.json.JSONException
json
- unstringer
- org.json.JSONException
public org.json.JSONObject toJSONObjectImpl() throws org.json.JSONException
toJSONObjectImpl
in class BasicReconfigurationPacket<NodeIDType>
org.json.JSONException
public IntegerPacketType getRequestType()
getRequestType
in interface Request
getRequestType
in class BasicReconfigurationPacket<NodeIDType>
public java.util.Set<NodeIDType> getAddedNodeIDs()
public java.util.Set<NodeIDType> getDeletedNodeIDs()
public java.net.InetSocketAddress getIssuer()
public ServerReconfigurationPacket<NodeIDType> setFailed()
setFailed
in interface ReconfiguratorRequest
this
public boolean isFailed()
isFailed
in interface ReconfiguratorRequest
public ServerReconfigurationPacket<NodeIDType> setResponseMessage(java.lang.String msg)
setResponseMessage
in interface ReconfiguratorRequest
this
public java.lang.String getResponseMessage()
getResponseMessage
in interface ReconfiguratorRequest
public java.lang.String getSummary()
Summarizable
getSummary
in interface Request
getSummary
in interface Summarizable
getSummary
in class BasicReconfigurationPacket<NodeIDType>
public java.net.InetSocketAddress getMyReceiver()
public boolean hasDeletedNodes()
public boolean hasAddedNodes()