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, serviceNameclientPacketTypes, HANDLER_METHOD_PREFIX, PACKET_TYPE, serverPacketTypestype| 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, 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, toString, wait, wait, waitgetServiceName, toBytes, toStringgetSummarypublic 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.JSONExceptionpublic org.json.JSONObject toJSONObjectImpl()
throws org.json.JSONException
toJSONObjectImpl in class BasicReconfigurationPacket<NodeIDType>org.json.JSONExceptionpublic IntegerPacketType getRequestType()
getRequestType in interface RequestgetRequestType 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 ReconfiguratorRequestthispublic boolean isFailed()
isFailed in interface ReconfiguratorRequestpublic ServerReconfigurationPacket<NodeIDType> setResponseMessage(java.lang.String msg)
setResponseMessage in interface ReconfiguratorRequestthispublic java.lang.String getResponseMessage()
getResponseMessage in interface ReconfiguratorRequestpublic java.lang.String getSummary()
SummarizablegetSummary in interface RequestgetSummary in interface SummarizablegetSummary in class BasicReconfigurationPacket<NodeIDType>public java.net.InetSocketAddress getMyReceiver()
public boolean hasDeletedNodes()
public boolean hasAddedNodes()