Package io.debezium.relational.history
Class MemorySchemaHistory
java.lang.Object
io.debezium.relational.history.AbstractSchemaHistory
io.debezium.relational.history.MemorySchemaHistory
- All Implemented Interfaces:
SchemaHistory
A
SchemaHistory
implementation that stores the schema history in memory.- Author:
- Randall Hauch
-
Field Summary
Modifier and TypeFieldDescriptionprivate final FunctionalReadWriteLock
private final List<HistoryRecord>
Fields inherited from class io.debezium.relational.history.AbstractSchemaHistory
ALL_FIELDS, config, logger
Fields inherited from interface io.debezium.relational.history.SchemaHistory
CONFIGURATION_FIELD_PREFIX_STRING, DDL_FILTER, INTERNAL_CONNECTOR_CLASS, INTERNAL_CONNECTOR_ID, INTERNAL_PREFER_DDL, NAME, SKIP_UNPARSEABLE_DDL_STATEMENTS, STORE_ONLY_CAPTURED_DATABASES_DDL, STORE_ONLY_CAPTURED_TABLES_DDL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
Determines if the database schema history entity exists; i.e.protected void
recoverRecords
(Consumer<HistoryRecord> records) boolean
Determines if the underlying storage exists (e.g.protected void
storeRecord
(HistoryRecord record) toString()
Methods inherited from class io.debezium.relational.history.AbstractSchemaHistory
configure, initializeStorage, record, record, recover, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.debezium.relational.history.SchemaHistory
recover, recover
-
Field Details
-
records
-
lock
-
-
Constructor Details
-
MemorySchemaHistory
public MemorySchemaHistory()Create an instance that keeps the history in memory.
-
-
Method Details
-
storeRecord
- Specified by:
storeRecord
in classAbstractSchemaHistory
-
recoverRecords
- Specified by:
recoverRecords
in classAbstractSchemaHistory
-
storageExists
public boolean storageExists()Description copied from interface:SchemaHistory
Determines if the underlying storage exists (e.g. a Kafka topic, file or similar). Note: storage may exist while history entities not yet written, seeSchemaHistory.exists()
-
exists
public boolean exists()Description copied from interface:SchemaHistory
Determines if the database schema history entity exists; i.e. the storage must have been initialized and the history must have been populated. -
toString
-