public interface ReplicableRequest extends Request, RequestIdentifier
Modifier and Type | Method and Description |
---|---|
boolean |
needsCoordination() |
default void |
setNeedsCoordination(boolean b)
Deprecated.
|
getRequestType, getServiceName, getSummary, toBytes, toString
getSummary
getRequestID
boolean needsCoordination()
@Deprecated default void setNeedsCoordination(boolean b)
needsCoordination()
should
subsequently return b
. This method is invoked by
AbstractReplicaCoordinator
with a false
argument just
before coordinating the request so that coordinated packets are not
coordinated again infinitely. For example, if a replica coordinator's
coordination strategy is to simply flood the request to all replicas,
there needs to be a way for a recipient of a copy of this already once
coordinated request to know that it should not coordinate it again. This
method provides AbstractReplicaCoordinator
a placeholder in the
application request to prevent such infinite coordination loops.
This method is now deprecated and does not need to be overridden by implementing classes. It's original purpose was really only to be able to easily do lazy propagation replica coordination without introducing an additional type (just to distinguish between the original request at the entry replica and the replicated request so as to avoid an infinite propagation loop), but introducing an additional type is the clean way to do this. Paxos for example already has its own types, so it doesn't need this method.
b
- True if subsequent invocations of needsCoordination()
must return true, false otherwise.