Class ObserveHandleUtils
- java.lang.Object
-
- cz.o2.proxima.direct.core.commitlog.ObserveHandleUtils
-
public class ObserveHandleUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isAtHead(ObserveHandle handle, CommitLogReader reader)
Check that the given consumer is at current HEAD position in theCommitLogReader
.
-
-
-
Method Detail
-
isAtHead
public static boolean isAtHead(ObserveHandle handle, CommitLogReader reader)
Check that the given consumer is at current HEAD position in theCommitLogReader
. HEAD is defined as position where the size of backlog is zero (all elements have been consumed and committed). Note that this state might change immediately after this call.- Parameters:
handle
-ObserveHandle
that belongs to a consumerreader
-CommitLogReader
that the consumer consumes from- Returns:
true
when the consumer is at HEAD position
-
-