类 ScheduledExecutorTask

    • 构造器详细资料

      • ScheduledExecutorTask

        public ScheduledExecutorTask​(Runnable executorTask)
        Create a new ScheduledExecutorTask, with default one-time execution without delay.
        参数:
        executorTask - the Runnable to schedule
      • ScheduledExecutorTask

        public ScheduledExecutorTask​(Runnable executorTask,
                                     long delay)
        Create a new ScheduledExecutorTask, with default one-time execution with the given delay.
        参数:
        executorTask - the Runnable to schedule
        delay - the delay before starting the task for the first time (ms)
      • ScheduledExecutorTask

        public ScheduledExecutorTask​(Runnable executorTask,
                                     long delay,
                                     long period,
                                     boolean fixedRate)
        Create a new ScheduledExecutorTask.
        参数:
        executorTask - the Runnable to schedule
        delay - the delay before starting the task for the first time (ms)
        period - the period between repeated task executions (ms)
        fixedRate - whether to schedule as fixed-rate execution