Class NoopAppendLimiter

java.lang.Object
io.camunda.zeebe.logstreams.impl.backpressure.NoopAppendLimiter
All Implemented Interfaces:
AppendLimiter

public final class NoopAppendLimiter extends Object implements AppendLimiter
  • Constructor Details

    • NoopAppendLimiter

      public NoopAppendLimiter()
  • Method Details

    • tryAcquire

      public boolean tryAcquire(Long position)
      Description copied from interface: AppendLimiter
      Try to add to the in flight appends. If success, AppendLimiter.onCommit(long) ()} must be called when the appending was successful
      Specified by:
      tryAcquire in interface AppendLimiter
      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: AppendLimiter
      Notify when then entry with the given position have been committed. This will release the acquired position and decrement the in flight count.
      Specified by:
      onCommit in interface AppendLimiter
      Parameters:
      position - the committed position
    • getInflight

      public int getInflight()
      Description copied from interface: AppendLimiter
      The current in flight append request count.
      Specified by:
      getInflight in interface AppendLimiter
      Returns:
      the current in flight
    • getLimit

      public int getLimit()
      Description copied from interface: AppendLimiter
      The current limit of concurrent appends.
      Specified by:
      getLimit in interface AppendLimiter
      Returns:
      the limit