Class FileBasedSnapshotStoreFactory

java.lang.Object
io.camunda.zeebe.snapshots.impl.FileBasedSnapshotStoreFactory
All Implemented Interfaces:
ReceivableSnapshotStoreFactory

public final class FileBasedSnapshotStoreFactory extends Object implements ReceivableSnapshotStoreFactory
Loads existing snapshots in memory, cleaning out old and/or invalid snapshots if present.

The current load strategy is to lookup all files directly under the SNAPSHOTS_DIRECTORY, try to extract FileBasedSnapshotId from them, and if not possible skip them (and print out a warning).

The metadata extraction is done by parsing the directory name using '%d-%d-%d-%d', where in order we expect: index, term, processed position and exported position.