public class HubUpdater extends Object
Constructor and Description |
---|
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 updateOperation,
BufferedLogService bufferLog,
String originalExceptionMessage)
Handle Hub exceptions thrown during the operation
|
Operation |
preUpdateHub(String operationType,
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 |
register(String changeLogFile)
Automatically register the current user with Hub
|
void |
syncHub(String changeLogFile,
DatabaseChangeLog databaseChangeLog,
UUID hubConnectionId) |
public HubUpdater(Date startTime, DatabaseChangeLog changeLog, Database database)
public Operation preUpdateHub(String operationType, Connection connection, String changeLogFile, Contexts contexts, LabelExpression labelExpression, ChangeLogIterator changeLogIterator) throws LiquibaseHubException, DatabaseException, LiquibaseException, SQLException
operationType
- Operation type (UPDATE or ROLLBACK)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 change setsLiquibaseHubException
- Thrown by HubServiceDatabaseException
- Thrown by Liquibase coreLiquibaseException
- Thrown by Liquibase coreSQLException
public void postUpdateHub(Operation updateOperation, BufferedLogService bufferLog)
updateOperation
- Operation object used in the updatebufferLog
- Log outputpublic void postUpdateHubExceptionHandling(Operation updateOperation, BufferedLogService bufferLog, String originalExceptionMessage)
updateOperation
- Operation object used during updatebufferLog
- Log outputoriginalExceptionMessage
- Exception thrown by the operationpublic boolean hubIsNotAvailable(String changeLogId)
changeLogId
- Changelog IDpublic void syncHub(String changeLogFile, DatabaseChangeLog databaseChangeLog, UUID hubConnectionId)
public void register(String changeLogFile) throws LiquibaseException, CommandExecutionException
changeLogFile
- ChangeLog path for this operationLiquibaseException
- Thrown if registration failsCommandExecutionException
- Thrown if registerChangeLog failsCopyright © 2021 Liquibase.org. All rights reserved.