Interface ServerTask<V>

    • Method Detail

      • setTaskContext

        void setTaskContext​(TaskContext taskContext)
        Sets the task context Store the value in your task implementation to be able to access caches and other resources in the task Note that there will be a single instance of each ServerTask on each server so, if you expect concurrent invocations of a task, the TaskContext should be stored in a ThreadLocal static field in your task. The TaskContext should then be obtained during the task's Callable.call() method and removed from the ThreadLocal.
        Parameters:
        taskContext - task execution context
      • getType

        default String getType()
        Description copied from interface: Task
        Returns the type of task. This is dependent on the specific implementation.
        Specified by:
        getType in interface Task