Interface AppendLimiter

All Known Implementing Classes:
AppendEntryLimiter, NoopAppendLimiter

public interface AppendLimiter
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The current in flight append request count.
    int
    The current limit of concurrent appends.
    void
    onCommit(long position)
    Notify when then entry with the given position have been committed.
    boolean
    tryAcquire(Long position)
    Try to add to the in flight appends.
  • Method Details

    • tryAcquire

      boolean tryAcquire(Long position)
      Try to add to the in flight appends. If success, onCommit(long) ()} must be called when the appending was successful
      Parameters:
      position - the corresponding position
      Returns:
      true if request is added to the in flight requests, false otherwise
    • onCommit

      void onCommit(long position)
      Notify when then entry with the given position have been committed. This will release the acquired position and decrement the in flight count.
      Parameters:
      position - the committed position
    • getInflight

      int getInflight()
      The current in flight append request count.
      Returns:
      the current in flight
    • getLimit

      int getLimit()
      The current limit of concurrent appends.
      Returns:
      the limit