Package io.pravega.shared.protocol.netty
Interface AppendBatchSizeTracker
-
public interface AppendBatchSizeTracker
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_BATCH_TIME_MILLIS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAppendBlockSize()Returns the size that should be used for the next append block.intgetBatchTimeout()Returns the timeout that should be used for append blocks.longrecordAck(long eventNumber)Records that one or more events have been acked.voidrecordAppend(long eventNumber, int size)Records that an append has been sent.
-
-
-
Field Detail
-
MAX_BATCH_TIME_MILLIS
static final int MAX_BATCH_TIME_MILLIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
recordAppend
void recordAppend(long eventNumber, int size)Records that an append has been sent.- Parameters:
eventNumber- the number of the eventsize- the size of the event
-
recordAck
long recordAck(long eventNumber)
Records that one or more events have been acked.- Parameters:
eventNumber- the number of the last event- Returns:
- The number of outstanding appends.
-
getAppendBlockSize
int getAppendBlockSize()
Returns the size that should be used for the next append block.- Returns:
- Integer indicating block size that should be used for the next append.
-
getBatchTimeout
int getBatchTimeout()
Returns the timeout that should be used for append blocks.- Returns:
- Integer indicating the batch timeout.
-
-