@FunctionalInterface public interface DuplicateHandler
| Modifier and Type | Field and Description |
|---|---|
static DuplicateHandler |
DEFAULT
Default handler printing only dropped commands to system output
|
static DuplicateHandler |
NOOP
No-op handler silently ignoring all duplicates.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dropCommandReceived(Command command)
A command is dropped and not appended to the command log because it is already stored there.
|
default void |
skipCommandProcessing(Command command)
Command processing is skipped as all events for this command ID have already been applied.
|
default void |
skipEventApplying(Event event)
Event applying is skipped because it has already been applied.
|
static final DuplicateHandler DEFAULT
static final DuplicateHandler NOOP
default void skipCommandProcessing(Command command)
This usually happens when
command - the skipped commanddefault void skipEventApplying(Event event)
This usually happens when
event - the skipped eventvoid dropCommandReceived(Command command)
This can happen when upstream applications re-send messages and those messages are identified as duplicates by the sequencer. Duplicates are identified via unique (input-id/sequence) pair of the command. Duplicate detection utilises the constraint that sequences must be monotonically increasing per input.
command - the dropped commandCopyright © 2020 tools4j.org (Marco Terzer, Anton Anufriev). All Rights Reserved.