public class ThrowingRestartStrategy extends Object implements RestartStrategy
IllegalStateException
on any method call.Modifier and Type | Class and Description |
---|---|
static class |
ThrowingRestartStrategy.ThrowingRestartStrategyFactory
Factory for
ThrowingRestartStrategy . |
Constructor and Description |
---|
ThrowingRestartStrategy() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRestart()
True if the restart strategy can be applied to restart the
ExecutionGraph . |
CompletableFuture<Void> |
restart(RestartCallback restarter,
ScheduledExecutor executor)
Called by the ExecutionGraph to eventually trigger a full recovery.
|
public boolean canRestart()
RestartStrategy
ExecutionGraph
.canRestart
in interface RestartStrategy
public CompletableFuture<Void> restart(RestartCallback restarter, ScheduledExecutor executor)
RestartStrategy
The thread that calls this method is not supposed to block/sleep.
restart
in interface RestartStrategy
restarter
- The hook to restart the ExecutionGraphexecutor
- An scheduled executor to delay the restartCompletableFuture
that will be completed when the restarting process is done.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.