public abstract class AbstractBaseDispatcher extends Object implements Dispatcher
| Modifier and Type | Field and Description |
|---|---|
static String |
NONE_KEY |
protected Subscription |
subscription |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBaseDispatcher(Subscription subscription) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessageToReplay(long ledgerId,
long entryId) |
void |
filterEntriesForConsumer(List<Entry> entries,
EntryBatchSizes batchSizes,
SendMessageInfo sendMessageInfo,
EntryBatchIndexesAcks indexesAcks,
ManagedCursor cursor,
boolean isReplayRead)
Filter messages that are being sent to a consumers.
|
protected byte[] |
peekStickyKey(io.netty.buffer.ByteBuf metadataAndPayload) |
void |
resetCloseFuture() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConsumer, addUnAckedMessages, canUnsubscribe, clearDelayedMessages, close, consumerFlow, cursorIsReset, disconnectActiveConsumers, disconnectAllConsumers, disconnectAllConsumers, getConsumers, getNumberOfDelayedMessages, getRateLimiter, getRedeliveryTracker, getType, initializeDispatchRateLimiterIfNeeded, isClosed, isConsumerConnected, markDeletePositionMoveForward, redeliverUnacknowledgedMessages, redeliverUnacknowledgedMessages, removeConsumer, reset, trackDelayedDelivery, updateRateLimiterprotected final Subscription subscription
public static final String NONE_KEY
protected AbstractBaseDispatcher(Subscription subscription)
public void filterEntriesForConsumer(List<Entry> entries, EntryBatchSizes batchSizes, SendMessageInfo sendMessageInfo, EntryBatchIndexesAcks indexesAcks, ManagedCursor cursor, boolean isReplayRead)
Messages can be filtered out for multiple reasons:
entries - a list of entries as read from storagebatchSizes - an array where the batch size for each entry (the number of messages within an entry) is stored. This
array needs to be of at least the same size as the entries listsendMessageInfo - an object where the total size in messages and bytes will be returned back to the callerpublic void resetCloseFuture()
resetCloseFuture in interface Dispatcherprotected byte[] peekStickyKey(io.netty.buffer.ByteBuf metadataAndPayload)
protected void addMessageToReplay(long ledgerId,
long entryId)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.