Package io.aeron.logbuffer
Class TermUnblocker
java.lang.Object
io.aeron.logbuffer.TermUnblocker
Unblocks a term buffer if a publisher has died leaving the log with a partial log entry.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStatus result of anunblock(UnsafeBuffer, UnsafeBuffer, int, int, int)operation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TermUnblocker.Statusunblock(UnsafeBuffer logMetaDataBuffer, UnsafeBuffer termBuffer, int blockedOffset, int tailOffset, int termId) Attempt to unblock the current term at the current offset.
-
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.- Current position length is > 0, then return
- Current position length is 0, scan forward by frame alignment until, one of the following:
- reach a non-0 length, unblock up to indicated position (check original frame length for non-0)
- reach end of term and tail position >= end of term, unblock up to end of term (check original frame length for non-0)
- reach tail position < end of term, do NOT unblock
- Parameters:
logMetaDataBuffer- containing the default headerstermBuffer- to unblockblockedOffset- to unblock attailOffset- to unblock up totermId- for the current term.- Returns:
- whether unblocking was done, not done, or applied to end of term
-