public class MigrationManager extends Object
Constructor and Description |
---|
MigrationManager(AsyncCuratorFramework client,
String lockPath,
String metaDataPath,
Executor executor,
Duration lockMax) |
Modifier and Type | Method and Description |
---|---|
protected List<Migration> |
filter(MigrationSet set,
List<byte[]> operationHashesInOrder)
Can be overridden to change how the comparison to previous migrations is done.
|
CompletionStage<Void> |
migrate(MigrationSet set)
Process the given migration set
|
public MigrationManager(AsyncCuratorFramework client, String lockPath, String metaDataPath, Executor executor, Duration lockMax)
client
- the curator clientlockPath
- base path for locks used by the managermetaDataPath
- base path to store the meta dataexecutor
- the executor to uselockMax
- max time to wait for lockspublic CompletionStage<Void> migrate(MigrationSet set)
set
- the setMigrationException
.protected List<Migration> filter(MigrationSet set, List<byte[]> operationHashesInOrder) throws MigrationException
MigrationException
is thrown.set
- the migration set being appliedoperationHashesInOrder
- previous operation hashes (may be empty)MigrationException
- errorsCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.