Class TermUnblocker

java.lang.Object
io.aeron.logbuffer.TermUnblocker

public class TermUnblocker extends Object
Unblocks a term buffer if a publisher has died leaving the log with a partial log entry.
  • Constructor Details

    • TermUnblocker

      public TermUnblocker()
  • Method Details

    • unblock

      public static TermUnblocker.Status unblock(UnsafeBuffer logMetaDataBuffer, UnsafeBuffer termBuffer, int blockedOffset, int tailOffset, int termId)
      Attempt to unblock the current term at the current offset.
      1. Current position length is > 0, then return
      2. Current position length is 0, scan forward by frame alignment until, one of the following:
        1. reach a non-0 length, unblock up to indicated position (check original frame length for non-0)
        2. reach end of term and tail position >= end of term, unblock up to end of term (check original frame length for non-0)
        3. reach tail position < end of term, do NOT unblock
      Parameters:
      logMetaDataBuffer - containing the default headers
      termBuffer - to unblock
      blockedOffset - to unblock at
      tailOffset - to unblock up to
      termId - for the current term.
      Returns:
      whether unblocking was done, not done, or applied to end of term