Skip to content

Commit

Permalink
Remove containsMessage from DelayedDeliveryTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Mar 26, 2023
1 parent d6c12d1 commit ce358bf
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ public interface DelayedDeliveryTracker extends AutoCloseable {
*/
boolean shouldPauseAllDeliveries();

/**
* Tells whether this DelayedDeliveryTracker contains this message index,
* if the tracker is not supported it or disabled this feature also will return false.
*/
boolean containsMessage(long ledgerId, long entryId);

/**
* Reset tick time use zk policies cache.
* @param tickTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ && getNumberOfDelayedMessages() >= fixedDelayDetectionLookahead
&& !hasMessageAvailable();
}

@Override
public boolean containsMessage(long ledgerId, long entryId) {
return false;
}

protected long nextDeliveryTime() {
return priorityQueue.peekN1();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ private boolean removeIndexBit(long ledgerId, long entryId) {
.orElse(false);
}

@Override
public boolean containsMessage(long ledgerId, long entryId) {
if (lastMutableBucket.containsMessage(ledgerId, entryId)) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public synchronized void readMoreEntries() {
Predicate<PositionImpl> skipCondition = null;
final DelayedDeliveryTracker deliveryTracker = delayedDeliveryTracker.get();
if (deliveryTracker instanceof BucketDelayedDeliveryTracker) {
skipCondition = position -> deliveryTracker
skipCondition = position -> ((BucketDelayedDeliveryTracker) deliveryTracker)
.containsMessage(position.getLedgerId(), position.getEntryId());
}
cursor.asyncReadEntriesWithSkipOrWait(messagesToRead, bytesToRead, this, ReadType.Normal,
Expand Down

0 comments on commit ce358bf

Please sign in to comment.