Interface TinyTaskExecService

  • All Implemented Interfaces:

    
    public interface TinyTaskExecService
    
                        

    Launch and cancel tasks, global management, same id can only be started once

    Since:

    2022-12-16

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract boolean launch(long id) launch a task
      abstract boolean force(long id) Force launch a task without scheduling
      abstract boolean cancel(long id) Cancel a task.
      abstract Set<Long> running() Get all running tasks
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • launch

         abstract boolean launch(long id)

        launch a task

      • force

         abstract boolean force(long id)

        Force launch a task without scheduling

      • cancel

         abstract boolean cancel(long id)

        Cancel a task. If the task does not exist, consider it as successful. When the application restarts or relaunches, the task should be restored.