Interface JournalMetaStore

All Known Implementing Classes:
JournalMetaStore.InMemory

public interface JournalMetaStore
  • Method Details

    • storeLastFlushedIndex

      void storeLastFlushedIndex(long index)
      Update lastFlushedIndex in metastore. This method can be expensive and blocking as the implementations of this may have to write to a database or a file.
      Parameters:
      index - last flushed index
    • loadLastFlushedIndex

      long loadLastFlushedIndex()
      Read last flushed index from the metastore. This method might be expensive and blocking as the implementations of this may have to read from a database or file. It is recommended for the callers of this method to cache lastFlushedIndex and call this method only when necessary.
      Returns:
      last flushed index
    • resetLastFlushedIndex

      void resetLastFlushedIndex()
      Nulls the last flushed index. After calling this, hasLastFlushedIndex() will return true.The actual value is implementation specific; to check if it was reset, call hasLastFlushedIndex().
    • hasLastFlushedIndex

      boolean hasLastFlushedIndex()
      Returns true if there is no known last flushed index.