Interface IWorkerChoiceStrategyInternal

Worker choice strategy interface.

Hierarchy

  • IWorkerChoiceStrategy

Properties

choose: (() => number)

Type declaration

    • (): number
    • Chooses a worker node in the pool and returns its key.

      Returns number

      The worker node key.

remove: ((workerNodeKey) => boolean)

Type declaration

    • (workerNodeKey): boolean
    • Removes the worker node key from strategy internals.

      Parameters

      • workerNodeKey: number

        The worker node key.

      Returns boolean

      true if the worker node key is removed, false otherwise.

reset: (() => boolean)

Type declaration

    • (): boolean
    • Resets strategy internals.

      Returns boolean

      true if the reset is successful, false otherwise.

setOptions: ((opts) => void)

Type declaration

    • (opts): void
    • Sets the worker choice strategy options.

      Parameters

      Returns void

strategyPolicy: StrategyPolicy

Strategy policy.

taskStatisticsRequirements: TaskStatisticsRequirements

Tasks statistics requirements.

update: ((workerNodeKey) => boolean)

Type declaration

    • (workerNodeKey): boolean
    • Updates the worker node key strategy internals.

      Parameters

      • workerNodeKey: number

      Returns boolean

      true if the update is successful, false otherwise.

Generated using TypeDoc