Package com.ultikits.ultitools.utils
Class AckFirstGate
java.lang.Object
com.ultikits.ultitools.utils.AckFirstGate
Implements persist-id, acknowledge, then execute for ack-first requests.
Result receipts are not recorded here; completed-link handlers own that step.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidhandle(CloudRequest request, CloudChannel channel, DedupeLedger ledger, Runnable execute) Records and persists a new id under the shared ledger monitor, then releases the monitor before acknowledging and executing.
-
Field Details
-
LOGGER
-
-
Constructor Details
-
AckFirstGate
private AckFirstGate()
-
-
Method Details
-
handle
static void handle(CloudRequest request, CloudChannel channel, DedupeLedger ledger, Runnable execute) Records and persists a new id under the shared ledger monitor, then releases the monitor before acknowledging and executing. Duplicates are acknowledged again but never executed. IOException during persistence is logged without exception text; acknowledgement and execution continue with in-memory dedupe. A refused send does not undo the recorded id or prevent first-time execution.- Parameters:
request- the validated ack-first requestchannel- the acknowledgement channelledger- the shared session ledger and synchronization monitorexecute- the first-delivery action, invoked outside the ledger monitor
-