public final class SingletonTask extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SingletonTask.Scheduler |
static interface |
SingletonTask.Worker |
| Constructor and Description |
|---|
SingletonTask(String name,
SingletonTask.Worker worker,
SingletonTask.Scheduler scheduler,
FailureHandler failureHandler) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<?> |
completion() |
void |
ensureScheduled()
Ensures the task will run in the future.
|
void |
stop()
Stop the task.
|
String |
toString() |
public SingletonTask(String name, SingletonTask.Worker worker, SingletonTask.Scheduler scheduler, FailureHandler failureHandler)
public void ensureScheduled()
public CompletableFuture<?> completion()
public void stop()
Callers must call this as the very last method on this object; any concurrent call may lead to unpredictable results.
Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.