NodeIDType
- FIXME: This class is increasingly under risk of becoming the
kitchen sink for every piece of information needed anywhere in the
reconfiguration protocol sequence. A better design may be to carry
the causal reconfiguration packet (create, delete, reconfigureRC,
etc.) here instead of carrying all fields in all startEpoch
packets.public class StartEpoch<NodeIDType> extends BasicReconfigurationPacket<NodeIDType>
Modifier and Type | Class and Description |
---|---|
protected static class |
StartEpoch.Keys |
ReconfigurationPacket.PacketType
Modifier and Type | Field and Description |
---|---|
java.net.InetSocketAddress |
creator
Sender address.
|
java.util.Set<NodeIDType> |
curEpochGroup
Group members in the current epoch being started.
|
java.lang.String |
initialState
Initial state of epoch being started.
|
boolean |
isMerge
Whether the corresponding reconfiguration is a merge (used in RC group
reconfiguration when RC nodes are deleted).
|
java.util.Set<java.lang.String> |
mergees
The list of deleted nodes that must be merged with this node.
|
java.util.Map<NodeIDType,java.net.InetSocketAddress> |
newlyAddedNodes
Socket address map for new RC nodes being added.
|
int |
prevEpoch
For supporting RC group merge or split operations wherein the previous
epoch group may have a different name and epoch number.
|
java.util.Set<NodeIDType> |
prevEpochGroup
Group members in the epoch just before the one being started.
|
java.lang.String |
prevGroupName
For supporting RC group merge or split operations wherein the previous
epoch group may have a different name.
|
java.net.InetSocketAddress |
receiver
Receiver address.
|
epochNumber, serviceName
clientPacketTypes, HANDLER_METHOD_PREFIX, PACKET_TYPE, serverPacketTypes
type
Constructor and Description |
---|
StartEpoch(org.json.JSONObject json,
Stringifiable<NodeIDType> unstringer) |
StartEpoch(NodeIDType initiator,
StartEpoch<NodeIDType> startEpoch)
Just to reset final field
initiator . |
StartEpoch(NodeIDType initiator,
java.lang.String serviceName,
int epochNumber,
java.util.Set<NodeIDType> curNodes,
boolean passive) |
StartEpoch(NodeIDType myID,
java.lang.String serviceName,
int epochNumber,
java.util.Set<NodeIDType> curNodes,
java.util.Set<NodeIDType> prevNodes,
java.net.InetSocketAddress creator,
java.net.InetSocketAddress receiver,
java.net.InetSocketAddress forwarder,
java.lang.String initialState,
java.util.Map<java.lang.String,java.lang.String> nameStates,
java.util.Map<NodeIDType,java.net.InetSocketAddress> newlyAddedNodes,
ReconfigurationConfig.ReconfigureUponActivesChange policy) |
StartEpoch(NodeIDType initiator,
java.lang.String serviceName,
int epochNumber,
java.util.Set<NodeIDType> curNodes,
java.util.Set<NodeIDType> prevNodes,
java.util.Set<java.lang.String> mergees) |
StartEpoch(NodeIDType initiator,
java.lang.String serviceName,
int epochNumber,
java.util.Set<NodeIDType> curNodes,
java.util.Set<NodeIDType> prevNodes,
java.lang.String prevGroupName,
boolean isMerge,
int prevEpoch) |
StartEpoch(StartEpoch<NodeIDType> startEpoch,
java.lang.String initialState)
Just to reset final field
initialState . |
getEpochNumber, getRequestType, getServiceName, getSummary
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
getSummary
public final java.util.Set<NodeIDType> prevEpochGroup
public final java.util.Set<NodeIDType> curEpochGroup
public final java.lang.String initialState
public final java.net.InetSocketAddress creator
public final java.net.InetSocketAddress receiver
public final java.lang.String prevGroupName
public final int prevEpoch
public final boolean isMerge
public final java.util.Map<NodeIDType,java.net.InetSocketAddress> newlyAddedNodes
public final java.util.Set<java.lang.String> mergees
public StartEpoch(NodeIDType initiator, java.lang.String serviceName, int epochNumber, java.util.Set<NodeIDType> curNodes, boolean passive)
initiator
- serviceName
- epochNumber
- curNodes
- passive
- public StartEpoch(NodeIDType initiator, java.lang.String serviceName, int epochNumber, java.util.Set<NodeIDType> curNodes, java.util.Set<NodeIDType> prevNodes, java.util.Set<java.lang.String> mergees)
initiator
- serviceName
- epochNumber
- curNodes
- prevNodes
- mergees
- public StartEpoch(NodeIDType initiator, java.lang.String serviceName, int epochNumber, java.util.Set<NodeIDType> curNodes, java.util.Set<NodeIDType> prevNodes, java.lang.String prevGroupName, boolean isMerge, int prevEpoch)
initiator
- serviceName
- epochNumber
- curNodes
- prevNodes
- prevGroupName
- isMerge
- prevEpoch
- public StartEpoch(NodeIDType myID, java.lang.String serviceName, int epochNumber, java.util.Set<NodeIDType> curNodes, java.util.Set<NodeIDType> prevNodes, java.net.InetSocketAddress creator, java.net.InetSocketAddress receiver, java.net.InetSocketAddress forwarder, java.lang.String initialState, java.util.Map<java.lang.String,java.lang.String> nameStates, java.util.Map<NodeIDType,java.net.InetSocketAddress> newlyAddedNodes, ReconfigurationConfig.ReconfigureUponActivesChange policy)
myID
- serviceName
- epochNumber
- curNodes
- prevNodes
- creator
- receiver
- forwarder
- initialState
- nameStates
- newlyAddedNodes
- policy
- public StartEpoch(StartEpoch<NodeIDType> startEpoch, java.lang.String initialState)
initialState
.startEpoch
- initialState
- public StartEpoch(NodeIDType initiator, StartEpoch<NodeIDType> startEpoch)
initiator
.initiator
- startEpoch
- public StartEpoch(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 ReconfigurationConfig.ReconfigureUponActivesChange getReconfigureUponActivesChangePolicy()
public long getInitTime()
public java.util.Set<NodeIDType> getCurEpochGroup()
public java.util.Set<NodeIDType> getPrevEpochGroup()
public java.util.Set<NodeIDType> getCommonMembers()
public java.util.Set<NodeIDType> getInitiatorAsSet()
public boolean isInitEpoch()
public boolean isBatchedCreate()
public boolean noCurEpochGroup()
public boolean noPrevEpochGroup()
public boolean hasPrevEpochGroup()
public boolean hasCurEpochGroup()
public boolean isCreateRequest()
public boolean isDeleteRequest()
public java.lang.String getInitialState()
public java.util.Map<java.lang.String,java.lang.String> getNameStates()
public java.lang.String getPrevGroupName()
public int getPrevEpochNumber()
public boolean isSplitOrMerge()
public boolean isSplit()
public boolean hasNewlyAddedNodes()
public boolean isMerge()
public java.util.Set<java.lang.String> getMergees()
public boolean hasMergees()
public java.util.Set<NodeIDType> getNewlyAddedNodes()
public StartEpoch<NodeIDType> setFirstPrevEpochCandidate(NodeIDType node)
node
- this
public NodeIDType getFirstPrevEpochCandidate()
public java.net.InetSocketAddress getForwarder()
public boolean isActiveNodeConfigChange()
public boolean isRCNodeConfigChange()
public boolean isNodeConfigChange()
public java.util.Set<NodeIDType> getDeletedNodes()
public java.net.InetSocketAddress getMyReceiver()
public boolean isPassive()