public interface DatabaseHistory
Tables. Changes to the database schema can be
recorded, and a database schema can be
recovered to various points in that history.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIGURATION_FIELD_PREFIX_STRING |
static Field |
DDL_FILTER |
static Field |
NAME |
static Field |
SKIP_UNPARSEABLE_DDL_STATEMENTS |
static Field |
STORE_ONLY_MONITORED_TABLES_DDL |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Configuration config,
HistoryRecordComparator comparator)
Configure this instance.
|
boolean |
exists()
Determines if the DatabaseHistory entity exists
|
void |
initializeStorage()
Called to initialize permanent storage of the history.
|
void |
record(Map<String,?> source,
Map<String,?> position,
String databaseName,
String ddl)
Record a change to the schema of the named database, and store it in the schema storage.
|
void |
record(Map<String,?> source,
Map<String,?> position,
String databaseName,
String schemaName,
String ddl,
TableChanges changes) |
void |
recover(Map<String,?> source,
Map<String,?> position,
Tables schema,
DdlParser ddlParser)
Recover the
database schema to a known point in its history. |
void |
start()
Start the history.
|
void |
stop()
Stop recording history and release any resources acquired since
configure(Configuration, HistoryRecordComparator). |
static final String CONFIGURATION_FIELD_PREFIX_STRING
static final Field NAME
static final Field SKIP_UNPARSEABLE_DDL_STATEMENTS
static final Field STORE_ONLY_MONITORED_TABLES_DDL
static final Field DDL_FILTER
void configure(Configuration config, HistoryRecordComparator comparator)
config - the configuration for this history storecomparator - the function that should be used to compare history records during
recovery; may be null if the
default comparator is to be usedvoid start()
void record(Map<String,?> source, Map<String,?> position, String databaseName, String ddl) throws DatabaseHistoryException
source - the information about the source database; may not be nullposition - the point in history where these DDL changes were made, which may be used when
recovering the schema to some point in history; may not be
nulldatabaseName - the name of the database whose schema is being changed; may be nullddl - the DDL statements that describe the changes to the database schema; may not be nullDatabaseHistoryException - if the record could not be writtenvoid record(Map<String,?> source, Map<String,?> position, String databaseName, String schemaName, String ddl, TableChanges changes) throws DatabaseHistoryException
DatabaseHistoryExceptionvoid recover(Map<String,?> source, Map<String,?> position, Tables schema, DdlParser ddlParser)
database schema to a known point in its history. Note that it is possible to recover the
database schema to a point in history that is earlier than what has been recorded. Likewise, when recovering to a point in history later than what was recorded, the database schema will
reflect the latest state known to the history.source - the information about the source database; may not be nullposition - the point in history at which the database schema should be recovered; may not be nullschema - the table definitions that should be changed to reflect the database schema at the desired point in history;
may not be nullddlParser - the DDL parser that can be used to apply DDL statements to the given schema; may not be nullvoid stop()
configure(Configuration, HistoryRecordComparator).boolean exists()
void initializeStorage()
Copyright © 2018 JBoss by Red Hat. All rights reserved.