Package com.hazelcast.scheduledexecutor
Class TaskUtils
java.lang.Object
com.hazelcast.scheduledexecutor.TaskUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic RunnableautoDisposable(Runnable runnable) Decorate anyRunnablewith aAutoDisposableTaskto destroy automatically after executionstatic <V> Callable<V>autoDisposable(Callable<V> callable) Decorate anyCallablewith aAutoDisposableTaskto destroy automatically after executionstatic Runnablestatic <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
NamedTaskinterface
-
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
NamedTaskinterface
-
autoDisposable
Decorate anyRunnablewith aAutoDisposableTaskto destroy automatically after execution- Parameters:
runnable- The runnable task to be disposed automatically- Returns:
- A new Runnable implementing the
AutoDisposableTaskinterface
-
autoDisposable
Decorate anyCallablewith aAutoDisposableTaskto 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
AutoDisposableTaskinterface
-