public abstract class AbstractBaseDispatcher extends Object implements Dispatcher
| Modifier and Type | Field and Description |
|---|---|
static String |
NONE_KEY |
protected ServiceConfiguration |
serviceConfig |
protected Subscription |
subscription |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBaseDispatcher(Subscription subscription,
ServiceConfiguration serviceConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addMessageToReplay(long ledgerId,
long entryId) |
protected static org.apache.commons.lang3.tuple.Pair<Integer,Long> |
computeReadLimits(int messagesToRead,
int availablePermitsOnMsg,
long bytesToRead,
long availablePermitsOnByte) |
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
protected final ServiceConfiguration serviceConfig
public static final String NONE_KEY
protected AbstractBaseDispatcher(Subscription subscription, ServiceConfiguration serviceConfig)
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 boolean addMessageToReplay(long ledgerId,
long entryId)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.