接口 Worker

    • 字段详细资料

      • logger

        static final org.slf4j.Logger logger
    • 方法详细资料

      • getTaskDefName

        String getTaskDefName()
        Retrieve the name of the task definition the worker is currently working on.
        返回:
        the name of the task definition.
      • onErrorUpdate

        default void onErrorUpdate​(ExecutingTask task)
        Called when the task coordinator fails to update the task to the server. Client should store the task id (in a database) and retry the update later
        参数:
        task - Task which cannot be updated back to the server.
      • paused

        default boolean paused()
        Override this method to pause the worker from polling.
        返回:
        true if the worker is paused and no more tasks should be polled from server.
      • getIdentity

        default String getIdentity()
        Override this method to app specific rules.
        返回:
        returns the serverId as the id of the instance that the worker is running.
      • getPollingInterval

        default int getPollingInterval()
        Override this method to change the interval between polls.
        返回:
        interval in millisecond at which the server should be polled for worker tasks.
      • leaseExtendEnabled

        default boolean leaseExtendEnabled()
      • getBatchPollTimeoutInMS

        default int getBatchPollTimeoutInMS()