public interface Deduplicator
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the state of this deduplicator.
|
Exchange |
find(Exchange.KeyMID key) |
Exchange |
findPrevious(Exchange.KeyMID key,
Exchange exchange)
Checks if the specified key is already associated with a previous
exchange and otherwise associates the key with the exchange specified.
|
void |
setExecutor(java.util.concurrent.ScheduledExecutorService executor)
Set the specified executor.
|
void |
start()
Starts the deduplicator
|
void |
stop()
Stops the deduplicator.
|
void start()
void stop()
void setExecutor(java.util.concurrent.ScheduledExecutorService executor)
executor
- the executorExchange findPrevious(Exchange.KeyMID key, Exchange exchange)
if (!duplicator.containsKey(key)) return duplicator.put(key, value); else return duplicator.get(key);except that the action is performed atomically.
key
- the keyexchange
- the exchangeExchange find(Exchange.KeyMID key)
void clear()