NodeIDType - public abstract class AbstractReconfigurablePaxosApp<NodeIDType> extends java.lang.Object implements Replicable, Reconfigurable
Replicable and yet be reconfigurable provided
PaxosReplicaCoordinator is used as the replica coordinator.| Constructor and Description |
|---|
AbstractReconfigurablePaxosApp() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteFinalState(java.lang.String name,
int epoch)
Garbage-collects the final state for name, epoch.
|
boolean |
execute(Request request,
boolean doNotReplyToClient)
This method must handle the request atomically and return true if
successful or throw an exception or return false.
|
java.lang.Integer |
getEpoch(java.lang.String name)
Returns the current (unique) epoch for name.
|
java.lang.String |
getFinalState(java.lang.String name,
int epoch)
Return the final checkpointed state for name, epoch.
|
ReconfigurableRequest |
getStopRequest(java.lang.String name,
int epoch)
This class returns a default no-op stop request.
|
void |
putInitialState(java.lang.String name,
int epoch,
java.lang.String state)
Inserts the specified state as the initial state for name, epoch.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckpoint, restoreexecutegetMutualAuthRequestTypes, getRequest, getRequest, getRequestTypes, getServerAuthRequestTypespublic ReconfigurableRequest getStopRequest(java.lang.String name, int epoch)
getStopRequest in interface Reconfigurablename:epoch.public java.lang.String getFinalState(java.lang.String name,
int epoch)
ReconfigurablegetFinalState in interface Reconfigurablepublic void putInitialState(java.lang.String name,
int epoch,
java.lang.String state)
ReconfigurableputInitialState in interface Reconfigurablepublic boolean deleteFinalState(java.lang.String name,
int epoch)
ReconfigurabledeleteFinalState in interface Reconfigurablename:epoch was deleted or did not
exist to begin with.public java.lang.Integer getEpoch(java.lang.String name)
ReconfigurablegetEpoch in interface Reconfigurablename.public boolean execute(Request request, boolean doNotReplyToClient)
Replicableexecute in interface ReplicabledoNotReplyToClient - If true, the application is expected to not send a response
back to the originating client (say, because this request is
part of a post-crash roll-forward or only the "entry replica"
that received the request from the client is expected to
respond back. If false, the application is expected to either
send a response (if any) back to the client via the
ClientMessenger interface or delegate response
messaging to paxos via the ClientRequest.getResponse()
interface.request.getServiceName()) altogether after a limited
number of retries, so the replica group may get stuck unless it
returns true after a limited number of retries. Thus, with paxos
as the replica coordination protocol, returning false is not
really an option as paxos has no way to "roll back" a request
whose global order has already been agreed upon.
With replica coordination protocols other than paxos, the boolean
return value could be used in protocol-specific ways, e.g., a
primary-backup protocol might normally execute a request at just
one replica but relay the request to one or more backups if the
return value of Application.execute(Request) is false.