@FunctionalInterface public interface AppenderListener
Implementations of this interface must be thread-safe as further discussed
under onExcerpt(Wire, long).
| Modifier and Type | Method and Description |
|---|---|
void |
onExcerpt(@NotNull net.openhft.chronicle.wire.Wire wire,
long index)
Invoked after an excerpt has been durably persisted to a queue.
|
void onExcerpt(@NotNull
@NotNull net.openhft.chronicle.wire.Wire wire,
long index)
The Thread that invokes this method is unspecified and may change, even from invocation to invocation. This means implementations must ensure thread-safety to guarantee correct behaviour. In particular, it is an error to assume the appending Thread will always be used do invoke this method.
If this method throws an Exception, it is relayed to the call site. Therefore, care should be taken to minimise the probability of throwing Exceptions.
It is imperative that actions performed by the method are as performant as possible as any delay incurred by the invocation of this method will carry over to the appender used to actually persist the message (i.e. both for synchronous and asynchronous appenders actually storing messages).
No promise is given as to when this method is invoked. However, eventually the method will be called for each excerpt persisted to the queue.
No promise is given as to the order in which invocations are made of this method.
wire - representing access to the excerpt that was stored (non-null).index - in the queue where the except was placed (non-negative)Copyright © 2024. All rights reserved.