Class TaskUtils

java.lang.Object
com.hazelcast.scheduledexecutor.TaskUtils

public final class TaskUtils
extends Object
A helper class with utilities to act upon Runnable and/or Callable tasks.
  • Method Details

    • named

      public static Runnable named​(String name, Runnable runnable)
      Decorate any Runnable with a NamedTask to provide naming information to scheduler.
      Parameters:
      name - The name that the task will have
      runnable - The runnable task to be named
      Returns:
      A new Runnable implementing the NamedTask interface
    • named

      public static <V> Callable<V> named​(String name, Callable<V> callable)
      Decorate any Callable with a NamedTask to provide naming information to scheduler.
      Type Parameters:
      V - The return type of callable task
      Parameters:
      name - The name that the task will have
      callable - The callable task to be named
      Returns:
      A new Callable implementing the NamedTask interface