NodeIDType
- This class is not a protocol task, just a usual runnable worker.
It is initiated at a reconfigurator in order to commit the
coordinated RCRecordRequest packets. We need a task for this
because simply invoking handleIncoming (that in turn calls paxos
propose) does not suffice to ensure that the command will be
eventually committed.public class CommitWorker<NodeIDType>
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
CommitWorker(AbstractReplicaCoordinator<?> coordinator,
ReconfiguratorCallback callback) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
coordinate(RCRecordRequest<NodeIDType> request) |
boolean |
enqueueForExecution(RCRecordRequest<NodeIDType> request) |
boolean |
enqueueForExecution(RCRecordRequest<NodeIDType> request,
long restartPeriod)
Should be used sparingly only for non-default restart periods, not for
all names.
|
boolean |
executedCallback(RCRecordRequest<NodeIDType> request) |
boolean |
executedCallback(RCRecordRequest<NodeIDType> request,
boolean handled)
We process some failed (handled = false) execution notifications to solve
the early notify issue with complete requests for service names, i.e.,
the notify arrives before the pending request is enqueued but the pending
request has been obviated anyway.
|
long |
getPeriod() |
static void |
main(java.lang.String[] args)
Sanity checking equals and hashCode for RCRecordRequest.
|
void |
run() |
java.lang.String |
toString() |
public CommitWorker(AbstractReplicaCoordinator<?> coordinator, ReconfiguratorCallback callback)
coordinator
- callback
- public void run()
run
in interface java.lang.Runnable
public void close()
public boolean enqueueForExecution(RCRecordRequest<NodeIDType> request)
request
- public boolean enqueueForExecution(RCRecordRequest<NodeIDType> request, long restartPeriod)
request
- restartPeriod
- public boolean executedCallback(RCRecordRequest<NodeIDType> request)
request
- public boolean executedCallback(RCRecordRequest<NodeIDType> request, boolean handled)
request
- handled
- executedCallback(RCRecordRequest)
.public boolean coordinate(RCRecordRequest<NodeIDType> request)
request
- public java.lang.String toString()
toString
in class java.lang.Object
public long getPeriod()
public static void main(java.lang.String[] args)
args
-