X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedClusterPool.html;h=76920c88d177d792ac6420c8bce1051e85bf348b;hb=aba8d9bd41f1bd46f3cc3863c0c2e74bdfacb7b6;hp=bac254b2f6e89a8fc6ba526f313bfa6a423416a9;hpb=1bb559f95ee0232e20550e28e4cfd3f6556cd8a8;p=poolifier.git diff --git a/docs/classes/FixedClusterPool.html b/docs/classes/FixedClusterPool.html index bac254b2..76920c88 100644 --- a/docs/classes/FixedClusterPool.html +++ b/docs/classes/FixedClusterPool.html @@ -18,11 +18,11 @@

A cluster pool with a fixed number of workers.

It is possible to perform tasks in sync or asynchronous mode as you prefer.

-

This pool selects the workers in a round robin fashion.

- -

Author

Christopher Quadflieg

+
+
+

Author

Christopher Quadflieg

-

Since

2.0.0

+

Since

2.0.0

Type Parameters

@@ -30,11 +30,13 @@
  • Data = unknown

    Type of data sent to the worker. This can only be serializable data.

    -
  • + +
  • Response = unknown

    Type of execution response. This can only be serializable data.

    -
  • + +

    Hierarchy

    +
  • Defined in src/pools/cluster/fixed.ts:40
  • @@ -52,55 +54,56 @@

    Constructors

    - + -

    Returns FixedClusterPool<Data, Response>

    +
  • Defined in src/pools/cluster/fixed.ts:51
  • Properties

    - +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

    • 'full': Emitted when the pool is dynamic and full.
    • 'busy': Emitted when the pool is busy.
    • +
    • 'error': Emitted when an uncaught error occurs.
    • +
    • 'taskError': Emitted when an error occurs while executing a task.
    -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:54
  • +
    +
    filePath: string

    Path to the worker file.

    -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:87
  • +
    +
    numberOfWorkers: number

    Number of workers that this pool should manage.

    -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:86
  • +
    +

    Options for this fixed cluster pool.

    -
    +
  • Defined in src/pools/cluster/fixed.ts:54
  • - +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...

    The execution response promise map.

    When we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id.

    -
    +
  • Defined in src/pools/abstract-pool.ts:64
  • - +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>

    Worker choice strategy context referencing a worker choice algorithm implementation.

    -

    Default to a round robin algorithm.

    -
    +
  • Defined in src/pools/abstract-pool.ts:72
  • - +
    workerNodes: WorkerNode<Worker, Data>[] = []

    Pool worker nodes.

    -
    +
  • Defined in src/pools/abstract-pool.ts:51
  • Accessors

    - +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    +
  • Defined in src/pools/cluster/fixed.ts:100
  • +
    + +

    Methods

    - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:486
  • - + -

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:94
  • - + -

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:470
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:717
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:684
  • - +
    +
  • Defined in src/pools/cluster/fixed.ts:89
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:431
  • - + -

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:70
  • - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:336
  • - + + +

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    -
    +
  • Defined in src/pools/abstract-pool.ts:396
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:387
  • - +
    +
  • Defined in src/pools/cluster/fixed.ts:65
  • - + -

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:81
  • - + -

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:76
  • - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:348
  • - + +

    Returns void

    +
    +
  • Defined in src/pools/abstract-pool.ts:303
  • - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:325
  • - +
    +
  • Defined in src/pools/cluster/fixed.ts:60
  • - +

    Returns void

    The listener function to execute when a message is received from a worker.

    -
    +
  • Defined in src/pools/abstract-pool.ts:741
  • +
  • constructor
  • +
  • emitter
  • +
  • filePath
  • +
  • numberOfWorkers
  • +
  • opts
  • +
  • promiseResponseMap
  • +
  • workerChoiceStrategyContext
  • +
  • workerNodes
  • +
  • busy
  • +
  • full
  • +
  • info
  • +
  • maxSize
  • +
  • minSize
  • +
  • type
  • +
  • worker
  • +
  • afterTaskExecutionHook
  • +
  • afterWorkerSetup
  • +
  • beforeTaskExecutionHook
  • +
  • createAndSetupDynamicWorker
  • +
  • createAndSetupWorker
  • +
  • createWorker
  • +
  • destroy
  • +
  • destroyWorker
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • internalBusy
  • +
  • isMain
  • +
  • registerWorkerMessageListener
  • +
  • sendToWorker
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • setupHook
  • +
  • workerListener
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • Queue
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • EventLoopUtilizationMeasurementStatistics
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • Draft
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • ThreadWorkerWithMessageChannel
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • Generated using TypeDoc

    \ No newline at end of file