I am trying to use chronicle queue to determine the last index of the current cycle. I will use the start index and the last index to do a final check before deleting the single cq4 for the cycle.
I would like to be able to find the last index of a cycle without iterating through every record. Is this possible?
Or
Is there a way to move the tailer to the next index without actually reading the record, and would it work with rolling over multiple cycles?
or
net.openhft.chronicle.queue.impl.single.SingleChronicleQueue#countExcerpts(fromIndex,toIndex)
where:
fromIndex = the first index of the target cycle
toIndex= the first index of the next cycle
This will give you the number of messages in the target cycle, you can consider this to be the sequenceNumber, you then just have to work out its index using queue.rollCycle().toIndex(targetCycle, sequenceNumber);