Package liquibase.changelog.visitor
Class AbstractChangeExecListener
java.lang.Object
liquibase.changelog.visitor.AbstractChangeExecListener
- All Implemented Interfaces:
ChangeExecListener
- Direct Known Subclasses:
LoggingChangeExecListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
ran
(Change change, ChangeSet changeSet, DatabaseChangeLog changeLog, Database database) void
ran
(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, ChangeSet.ExecType execType) Called after the given changeset is run.void
rollbackFailed
(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Exception e) Called when there is a rollback failurevoid
rolledBack
(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) Called after a change is rolled back.void
runFailed
(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Exception exception) void
willRollback
(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) Called before a change is rolled back.void
willRun
(Change change, ChangeSet changeSet, DatabaseChangeLog changeLog, Database database) void
willRun
(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, ChangeSet.RunStatus runStatus) Called just before a given changeset is run.
-
Constructor Details
-
AbstractChangeExecListener
public AbstractChangeExecListener()
-
-
Method Details
-
willRun
public void willRun(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, ChangeSet.RunStatus runStatus) Description copied from interface:ChangeExecListener
Called just before a given changeset is run.- Specified by:
willRun
in interfaceChangeExecListener
- Parameters:
changeSet
- that will be rundatabaseChangeLog
- parent changelogdatabase
- the database the change will be run againstrunStatus
- of the current change from the database
-
ran
public void ran(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, ChangeSet.ExecType execType) Description copied from interface:ChangeExecListener
Called after the given changeset is run.- Specified by:
ran
in interfaceChangeExecListener
- Parameters:
changeSet
- changeSet that was rundatabaseChangeLog
- the parent changelogdatabase
- the database the change was run againstexecType
- is the result
-
willRollback
public void willRollback(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) Called before a change is rolled back.- Specified by:
willRollback
in interfaceChangeExecListener
- Parameters:
changeSet
- changeSet that was rolled backdatabaseChangeLog
- parent change logdatabase
- the database the rollback was executed on.
-
rollbackFailed
public void rollbackFailed(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Exception e) Called when there is a rollback failure- Specified by:
rollbackFailed
in interfaceChangeExecListener
- Parameters:
changeSet
- changeSet that was rolled backdatabaseChangeLog
- parent change logdatabase
- the database the rollback was executed on.e
- the original exception which was thrown
-
rolledBack
Description copied from interface:ChangeExecListener
Called after a change is rolled back.- Specified by:
rolledBack
in interfaceChangeExecListener
- Parameters:
changeSet
- changeSet that was rolled backdatabaseChangeLog
- parent change logdatabase
- the database the rollback was executed on.
-
preconditionFailed
public void preconditionFailed(PreconditionFailedException error, PreconditionContainer.FailOption onFail) - Specified by:
preconditionFailed
in interfaceChangeExecListener
-
preconditionErrored
public void preconditionErrored(PreconditionErrorException error, PreconditionContainer.ErrorOption onError) - Specified by:
preconditionErrored
in interfaceChangeExecListener
-
willRun
public void willRun(Change change, ChangeSet changeSet, DatabaseChangeLog changeLog, Database database) - Specified by:
willRun
in interfaceChangeExecListener
-
ran
- Specified by:
ran
in interfaceChangeExecListener
-
runFailed
public void runFailed(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Exception exception) - Specified by:
runFailed
in interfaceChangeExecListener
-