T
- type of the restored backend.S
- type of the supplied snapshots from which the backend restores.public class BackendRestorerProcedure<T extends Closeable & Disposable & Snapshotable<?,Collection<S>>,S extends StateObject> extends Object
Constructor and Description |
---|
BackendRestorerProcedure(SupplierWithException<T,Exception> instanceSupplier,
CloseableRegistry backendCloseableRegistry,
String logDescription)
Creates a new backend restorer using the given backend supplier and the closeable registry.
|
Modifier and Type | Method and Description |
---|---|
T |
createAndRestore(List<? extends Collection<S>> restoreOptions)
Creates a new state backend and restores it from the provided set of state snapshot alternatives.
|
public BackendRestorerProcedure(@Nonnull SupplierWithException<T,Exception> instanceSupplier, @Nonnull CloseableRegistry backendCloseableRegistry, @Nonnull String logDescription)
instanceSupplier
- factory function for new, empty backend instances.backendCloseableRegistry
- registry to allow participation in task lifecycle, e.g. react to cancel.@Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception
restoreOptions
- list of prioritized state snapshot alternatives for recovery.Exception
- if the backend could not be created or restored.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.