Class NoopAppendLimiter
java.lang.Object
io.camunda.zeebe.logstreams.impl.backpressure.NoopAppendLimiter
- All Implemented Interfaces:
AppendLimiter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe current in flight append request count.intgetLimit()The current limit of concurrent appends.voidonCommit(long position) Notify when then entry with the given position have been committed.booleantryAcquire(Long position) Try to add to the in flight appends.
-
Constructor Details
-
NoopAppendLimiter
public NoopAppendLimiter()
-
-
Method Details
-
tryAcquire
Description copied from interface:AppendLimiterTry to add to the in flight appends. If success,AppendLimiter.onCommit(long)()} must be called when the appending was successful- Specified by:
tryAcquirein interfaceAppendLimiter- Parameters:
position- the corresponding position- Returns:
- true if request is added to the in flight requests, false otherwise
-
onCommit
public void onCommit(long position) Description copied from interface:AppendLimiterNotify when then entry with the given position have been committed. This will release the acquired position and decrement the in flight count.- Specified by:
onCommitin interfaceAppendLimiter- Parameters:
position- the committed position
-
getInflight
public int getInflight()Description copied from interface:AppendLimiterThe current in flight append request count.- Specified by:
getInflightin interfaceAppendLimiter- Returns:
- the current in flight
-
getLimit
public int getLimit()Description copied from interface:AppendLimiterThe current limit of concurrent appends.- Specified by:
getLimitin interfaceAppendLimiter- Returns:
- the limit
-