Write an operation to the next ViewNode.
To make sure that the operations are distributed throughout the cluster,
the ViewNode is changed every time a new operation is added. Since the
getNextNode() method increments the ViewNode IDs and calculates the
modulo, the nodes are selected in a round-robin fashion.
op - the operation to run.
public java.util.List<ViewNode> getConnectedNodes()
Returns the currently connected ViewNodes.
a list of currently connected ViewNodes.
protected void checkState()
Checks the state of the ViewConnection.
If shutdown is currently in progress, an Exception is thrown.
public boolean shutdown()
Initiates the shutdown of all connected ViewNodes.
false if a connection is already in progress, true otherwise.
Reconfigures the connected ViewNodes.
When a reconfiguration event happens, new ViewNodes may need to be added
or old ones need to be removed from the current configuration. This method
takes care that those operations are performed in the correct order and
are executed in a thread-safe manner.