Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Don't find min as it is checked already
Browse files Browse the repository at this point in the history
  • Loading branch information
ferbncode committed Nov 2, 2018
1 parent 3edc0d1 commit b19ca1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ public List<ConsumedEvent> extractMaxEvents(final long currentTimeMillis, final
return result;
}

public int getNumberOfUnsentEvents() {
return this.nakadiEvents.size();
}

int getKeepAliveInARow() {
return keepAliveInARow;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private void streamToOutput(final boolean streamTimeoutReached) {

long deltaSize = heaviestPartition.getValue().getBytesInMemory();
final List<ConsumedEvent> events = heaviestPartition.getValue().extractMaxEvents(currentTimeMillis,
Math.min((int) getMessagesAllowedToSend(), heaviestPartition.getValue().getNumberOfUnsentEvents()));
(int) getMessagesAllowedToSend());
deltaSize -= heaviestPartition.getValue().getBytesInMemory();

sentSomething = true;
Expand Down

0 comments on commit b19ca1f

Please sign in to comment.