Package io.camunda.zeebe.journal
Interface JournalMetaStore
- All Known Implementing Classes:
JournalMetaStore.InMemory
public interface JournalMetaStore
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if there is no known last flushed index.longRead last flushed index from the metastore.voidNulls the last flushed index.voidstoreLastFlushedIndex(long index) Update lastFlushedIndex in metastore.
-
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, callhasLastFlushedIndex(). -
hasLastFlushedIndex
boolean hasLastFlushedIndex()Returns true if there is no known last flushed index.
-