public class HubUpdater extends Object
| Constructor and Description |
|---|
HubUpdater(Date startTime,
Database database) |
HubUpdater(Date startTime,
DatabaseChangeLog changeLog,
Database database) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hubIsNotAvailable(String changeLogId)
Determine if the Hub is not available
|
void |
postUpdateHub(Operation updateOperation,
BufferedLogService bufferLog)
Update the Hub after the operation
|
void |
postUpdateHubExceptionHandling(Operation operation,
BufferedLogService bufferLog,
String originalExceptionMessage)
Handle Hub exceptions thrown during the operation
|
Operation |
preUpdateHub(String operationType,
String operationCommand,
Connection connection)
This method performs a syncHub and returns a new Operation instance
If there is an error or the Hub is not available it returns null
|
Operation |
preUpdateHub(String operationType,
String operationCommand,
Connection connection,
String changeLogFile,
Contexts contexts,
LabelExpression labelExpression,
ChangeLogIterator changeLogIterator)
This method performs a syncHub and returns a new Operation instance
If there is an error or the Hub is not available it returns null
|
void |
syncHub(String changeLogFile,
Connection hubConnection) |
public HubUpdater(Date startTime, DatabaseChangeLog changeLog, Database database)
public Operation preUpdateHub(String operationType, String operationCommand, Connection connection) throws LiquibaseException, SQLException
operationType - Operation type (UPDATE or ROLLBACK)connection - Connection for this operationLiquibaseHubException - Thrown by HubServiceDatabaseException - Thrown by Liquibase coreLiquibaseException - Thrown by Liquibase coreSQLExceptionpublic Operation preUpdateHub(String operationType, String operationCommand, Connection connection, String changeLogFile, Contexts contexts, LabelExpression labelExpression, ChangeLogIterator changeLogIterator) throws LiquibaseHubException, DatabaseException, LiquibaseException, SQLException
operationType - Operation type (UPDATE, ROLLBACK, or CHANGELOGSYNC)operationCommand - Specific command which is executing (update, update-count, etc.)connection - Connection for this operationchangeLogFile - Path to DatabaseChangelog for this operationcontexts - Contexts to use for filteringlabelExpression - Labels to use for filteringchangeLogIterator - Iterator to use for going through changesetsLiquibaseHubException - Thrown by HubServiceDatabaseException - Thrown by Liquibase coreLiquibaseException - Thrown by Liquibase coreSQLExceptionpublic void postUpdateHub(Operation updateOperation, BufferedLogService bufferLog)
updateOperation - Operation object used in the updatebufferLog - Log outputpublic void postUpdateHubExceptionHandling(Operation operation, BufferedLogService bufferLog, String originalExceptionMessage)
operation - Operation objectbufferLog - Log outputoriginalExceptionMessage - Exception thrown by the operationpublic boolean hubIsNotAvailable(String changeLogId)
changeLogId - Changelog IDpublic void syncHub(String changeLogFile, Connection hubConnection) throws CommandExecutionException
CommandExecutionExceptionCopyright © 2023 Liquibase.org. All rights reserved.