Package io.camunda.zeebe.journal
Class JournalMetaStore.InMemory
java.lang.Object
io.camunda.zeebe.journal.JournalMetaStore.InMemory
- All Implemented Interfaces:
JournalMetaStore
- Enclosing interface:
- JournalMetaStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.journal.JournalMetaStore
JournalMetaStore.InMemory -
Constructor Summary
Constructors -
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.
-
Constructor Details
-
InMemory
public InMemory()
-
-
Method Details
-
storeLastFlushedIndex
public void storeLastFlushedIndex(long index) Description copied from interface:JournalMetaStoreUpdate 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:
storeLastFlushedIndexin interfaceJournalMetaStore- Parameters:
index- last flushed index
-
loadLastFlushedIndex
public long loadLastFlushedIndex()Description copied from interface:JournalMetaStoreRead 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:
loadLastFlushedIndexin interfaceJournalMetaStore- Returns:
- last flushed index
-
resetLastFlushedIndex
public void resetLastFlushedIndex()Description copied from interface:JournalMetaStoreNulls the last flushed index. After calling this,JournalMetaStore.hasLastFlushedIndex()will return true.The actual value is implementation specific; to check if it was reset, callJournalMetaStore.hasLastFlushedIndex().- Specified by:
resetLastFlushedIndexin interfaceJournalMetaStore
-
hasLastFlushedIndex
public boolean hasLastFlushedIndex()Description copied from interface:JournalMetaStoreReturns true if there is no known last flushed index.- Specified by:
hasLastFlushedIndexin interfaceJournalMetaStore
-