X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedClusterPool.html;h=3f1be4eb31f209e8ecb7808737304bd17fbfe76f;hb=6d59ea2c71b8a88d41498c6fb54dfad95fd3a3ac;hp=d081af9f29800f20b73064e32d8ff0afeda8de2c;hpb=86f5c6c11d0a262b6514b95928b2534eecc37a4e;p=poolifier.git diff --git a/docs/classes/FixedClusterPool.html b/docs/classes/FixedClusterPool.html index d081af9f..3f1be4eb 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,54 +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:55
  • +
    +
    filePath: string

    Path to the worker file.

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

    Number of workers that this pool should manage.

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

    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:65
  • - +
    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:73
  • - +
    workerNodes: WorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

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

    Methods

    - + -

    Returns void

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

    Returns void

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

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:489
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:736
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:703
  • - +
    +
  • Defined in src/pools/cluster/fixed.ts:89
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:450
  • - + -

    Returns void

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

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:356
  • - + + +
    +
  • +
    Optional name: string
    +

    The name of the worker function to execute. If not specified, the default worker function will be executed.

    +
    +
  • Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    -
    +
  • Defined in src/pools/abstract-pool.ts:416
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:407
  • - +
    +
  • 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:368
  • - + +

    Returns void

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

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:345
  • - +
    +
  • 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:763
  • +
  • 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