- All Implemented Interfaces:
- RdDebugFlags, Runnable
public class InvoicerThread
- extends Thread
- implements RdDebugFlags
This class is responsible for ensuring retransmissions of NAKs and recovery
requests. This thread needs to have reconfigurable parameters which ensures
that parameters pertaining to retransmission can be easily specified.
|Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public InvoicerThread(int entityId,
public void processMissedSequences(int templateId,
public void processMissedSequence(int templateId,
public void processRetransmittedEvent(RdRetransmissionServiceEvent retransmitEvent)
public void issueRecoveryRequest(RdRecoveryEntityRequest recoveryRequest)
public void manageRecoveryRequest(RdRecoveryEntityRequest recoveryRequest)
public void manageRecoveryResponse(RdRecoveryResponse recoveryResponse)
public void manageNakRequest()
public void processSyncAdvance(int templateId,
- Check to see if the sync advancement implies that recovery on the
recovering template is complete. If the advanceSync is equal to
the associated donotAckUntil, recovery is considered to be complete.
public RdAckInvoiceEntityEvent createAckInvoiceEvent(int templateId,
- This method creates the appropriate AckInvoiceEntityEvent. If this
method returns a NULL it implies that there is nothing that needs to
be acknowledged at the present time. One may have received events, but
until recovery is complete we don't ack events received while
"recovering" --- this ensures that there is not a retransmission
Lets say a client leaves when it's sync is 400.
After a few hours when it reconnects it receives event with seq -> 800
Now also, let us say that recovery response indicates that we have
missed 250 events 500-750
When we ACK retransitted events we will be ACKing 800 also since it is
not removed from the ACK set till the syncpoint for a template has
actually been advanced to 800.
So we keep getting ACKResponses which will have missed events between
whatever was ACKed (say 510) and 800. This will trigger a NAK and so
forth. The process then repeats itself over and over.
This method addresses this problem and fixes it.
public void run()
- Specified by:
run in interface
run in class
public void terminateService()
For comments and suggestions please send
The NaradaBrokering Project