public final class TaskUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <V> Callable<V> |
autoDisposable(Callable<V> callable)
Decorate any
Callable with a AutoDisposableTask to destroy automatically after execution |
static Runnable |
autoDisposable(Runnable runnable)
Decorate any
Runnable with a AutoDisposableTask to destroy automatically after execution |
static <V> Callable<V> |
named(String name,
Callable<V> callable)
|
static Runnable |
named(String name,
Runnable runnable)
|
public static Runnable named(String name, Runnable runnable)
name
- The name that the task will haverunnable
- The runnable task to be namedNamedTask
interfacepublic static <V> Callable<V> named(String name, Callable<V> callable)
V
- The return type of callable taskname
- The name that the task will havecallable
- The callable task to be namedNamedTask
interfacepublic static Runnable autoDisposable(Runnable runnable)
Runnable
with a AutoDisposableTask
to destroy automatically after executionrunnable
- The runnable task to be disposed automaticallyAutoDisposableTask
interfacepublic static <V> Callable<V> autoDisposable(Callable<V> callable)
Callable
with a AutoDisposableTask
to destroy automatically after executionV
- The return type of callable taskcallable
- The callable task to be disposed automaticallyAutoDisposableTask
interfaceCopyright © 2024 Hazelcast, Inc.. All rights reserved.