Class TaskCommand

    • Field Detail

      • MAX_QUEUING_MILLIS

        public static final long MAX_QUEUING_MILLIS
        How long we will queue a task before giving up and cancelling it (default value)
        See Also:
        Constant Field Values
    • Constructor Detail

      • TaskCommand

        public TaskCommand()
    • Method Detail

      • getTaskClass

        @Nullable
        public Class<? extends Task<?>> getTaskClass()
        Obtain the class of the Task object that will be run for this command.

        If null, the task command cannot be submitted through TaskRunningService.submitTaskCommand(TaskCommand) and a task object must be explicitly created.

        For now, this how we map from TaskCommand to Task that actually runs it. We have to have this mapping somewhere until we make Tasks themselves serializable. Tasks are not readily serializable because they have dependencies to Spring services. at which point TaskCommand can be deprecated(or remain as TaskContext).