Package com.hazelcast.scheduledexecutor
Class TaskUtils
java.lang.Object
com.hazelcast.scheduledexecutor.TaskUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Runnable
autoDisposable
(Runnable runnable) Decorate anyRunnable
with aAutoDisposableTask
to destroy automatically after executionstatic <V> Callable<V>
autoDisposable
(Callable<V> callable) Decorate anyCallable
with aAutoDisposableTask
to destroy automatically after executionstatic Runnable
static <V> Callable<V>
-
Method Details
-
named
- Parameters:
name
- The name that the task will haverunnable
- The runnable task to be named- Returns:
- A new Runnable implementing the
NamedTask
interface
-
named
- Type Parameters:
V
- The return type of callable task- Parameters:
name
- The name that the task will havecallable
- The callable task to be named- Returns:
- A new Callable implementing the
NamedTask
interface
-
autoDisposable
Decorate anyRunnable
with aAutoDisposableTask
to destroy automatically after execution- Parameters:
runnable
- The runnable task to be disposed automatically- Returns:
- A new Runnable implementing the
AutoDisposableTask
interface
-
autoDisposable
Decorate anyCallable
with aAutoDisposableTask
to destroy automatically after execution- Type Parameters:
V
- The return type of callable task- Parameters:
callable
- The callable task to be disposed automatically- Returns:
- A new Callable implementing the
AutoDisposableTask
interface
-