Class JournalMetaStore.InMemory

java.lang.Object
io.camunda.zeebe.journal.JournalMetaStore.InMemory
All Implemented Interfaces:
JournalMetaStore
Enclosing interface:
JournalMetaStore

public static class JournalMetaStore.InMemory extends Object implements JournalMetaStore
  • Constructor Details

    • InMemory

      public InMemory()
  • Method Details

    • storeLastFlushedIndex

      public void storeLastFlushedIndex(long index)
      Description copied from interface: JournalMetaStore
      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.
      Specified by:
      storeLastFlushedIndex in interface JournalMetaStore
      Parameters:
      index - last flushed index
    • loadLastFlushedIndex

      public long loadLastFlushedIndex()
      Description copied from interface: JournalMetaStore
      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.
      Specified by:
      loadLastFlushedIndex in interface JournalMetaStore
      Returns:
      last flushed index
    • resetLastFlushedIndex

      public void resetLastFlushedIndex()
      Description copied from interface: JournalMetaStore
      Nulls the last flushed index. After calling this, JournalMetaStore.hasLastFlushedIndex() will return true.The actual value is implementation specific; to check if it was reset, call JournalMetaStore.hasLastFlushedIndex().
      Specified by:
      resetLastFlushedIndex in interface JournalMetaStore
    • hasLastFlushedIndex

      public boolean hasLastFlushedIndex()
      Description copied from interface: JournalMetaStore
      Returns true if there is no known last flushed index.
      Specified by:
      hasLastFlushedIndex in interface JournalMetaStore