Class ChronicleLogOffsetTracker

  • All Implemented Interfaces:
    AutoCloseable

    public class ChronicleLogOffsetTracker
    extends Object
    implements AutoCloseable
    Track committed offset for a Log.
    Since:
    9.3
    • Field Detail

      • offsetQueue

        protected final net.openhft.chronicle.queue.impl.single.SingleChronicleQueue offsetQueue
      • partition

        protected final int partition
      • lastCommittedOffset

        protected long lastCommittedOffset
    • Method Detail

      • exists

        public static boolean exists​(Path basePath,
                                     Name group)
      • isOffsetTracker

        public static boolean isOffsetTracker​(String dirName)
      • getGroupFromDirectory

        public static String getGroupFromDirectory​(String dirName)
      • getLastCommittedOffset

        public long getLastCommittedOffset()
        Use a cache to return the last committed offset, concurrent consumer is not taken in account use readLastCommittedOffset() in concurrency.
      • readLastCommittedOffset

        public long readLastCommittedOffset()
        Read the last committed offset from the file.
      • doReadLastCommittedOffset

        protected long doReadLastCommittedOffset()
      • commit

        public void commit​(long offset)