Class ProcedureFutureUtil
java.lang.Object
org.apache.hadoop.hbase.procedure2.ProcedureFutureUtil
A helper class for switching procedure out(yielding) while it is doing some time consuming
operation, such as updating meta, where we can get a
CompletableFuture
about the
operation.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkFuture
(Procedure<?> proc, Supplier<CompletableFuture<Void>> getFuture, Consumer<CompletableFuture<Void>> setFuture, Runnable actionAfterDone) static void
static void
suspendIfNecessary
(Procedure<?> proc, Consumer<CompletableFuture<Void>> setFuture, CompletableFuture<Void> future, MasterProcedureEnv env, Runnable actionAfterDone) static void
wakeUp
(Procedure<?> proc, MasterProcedureEnv env)
-
Field Details
-
LOG
-
-
Constructor Details
-
ProcedureFutureUtil
private ProcedureFutureUtil()
-
-
Method Details
-
checkFuture
public static boolean checkFuture(Procedure<?> proc, Supplier<CompletableFuture<Void>> getFuture, Consumer<CompletableFuture<Void>> setFuture, Runnable actionAfterDone) throws IOException - Throws:
IOException
-
suspendIfNecessary
public static void suspendIfNecessary(Procedure<?> proc, Consumer<CompletableFuture<Void>> setFuture, CompletableFuture<Void> future, MasterProcedureEnv env, Runnable actionAfterDone) throws IOException, ProcedureSuspendedException -
suspend
- Throws:
ProcedureSuspendedException
-
wakeUp
-