Package io.debezium.relational.history
Class MemoryDatabaseHistory
- java.lang.Object
-
- io.debezium.relational.history.AbstractDatabaseHistory
-
- io.debezium.relational.history.MemoryDatabaseHistory
-
- All Implemented Interfaces:
DatabaseHistory
@ThreadSafe public final class MemoryDatabaseHistory extends AbstractDatabaseHistory
ADatabaseHistoryimplementation that stores the schema history in memory.- Author:
- Randall Hauch
-
-
Field Summary
Fields Modifier and Type Field Description private FunctionalReadWriteLocklockprivate List<HistoryRecord>records-
Fields inherited from class io.debezium.relational.history.AbstractDatabaseHistory
config, INTERNAL_PREFER_DDL, logger
-
Fields inherited from interface io.debezium.relational.history.DatabaseHistory
CONFIGURATION_FIELD_PREFIX_STRING, DDL_FILTER, NAME, SKIP_UNPARSEABLE_DDL_STATEMENTS, STORE_ONLY_CAPTURED_TABLES_DDL, STORE_ONLY_MONITORED_TABLES_DDL
-
-
Constructor Summary
Constructors Constructor Description MemoryDatabaseHistory()Create an instance that keeps the history in memory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Determines if the database history entity exists; i.e.protected voidrecoverRecords(Consumer<HistoryRecord> records)booleanstorageExists()Determines if the underlying storage exists (e.g.protected voidstoreRecord(HistoryRecord record)StringtoString()-
Methods inherited from class io.debezium.relational.history.AbstractDatabaseHistory
configure, initializeStorage, record, record, recover, skipUnparseableDdlStatements, start, stop, storeOnlyCapturedTables
-
-
-
-
Field Detail
-
records
private final List<HistoryRecord> records
-
lock
private final FunctionalReadWriteLock lock
-
-
Method Detail
-
storeRecord
protected void storeRecord(HistoryRecord record)
- Specified by:
storeRecordin classAbstractDatabaseHistory
-
recoverRecords
protected void recoverRecords(Consumer<HistoryRecord> records)
- Specified by:
recoverRecordsin classAbstractDatabaseHistory
-
storageExists
public boolean storageExists()
Description copied from interface:DatabaseHistoryDetermines if the underlying storage exists (e.g. a Kafka topic, file or similar). Note: storage may exist while history entities not yet written, seeDatabaseHistory.exists()
-
exists
public boolean exists()
Description copied from interface:DatabaseHistoryDetermines if the database history entity exists; i.e. the storage must have been initialized and the history must have been populated.
-
-