X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FAbstractPool.html;h=3e8972e96258662bea8323a7764dbc3ab11fac57;hb=938d9c678aa8e70e5642feffb90604cf25c993fe;hp=25e97424a6d2789881b4becb939bfcb243360deb;hpb=06fa9e0de6b62965c9dd2fe6023e943f35775026;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index 25e97424..3e8972e9 100644
--- a/docs/classes/AbstractPool.html
+++ b/docs/classes/AbstractPool.html
@@ -1,4 +1,4 @@
-
AbstractPool | poolifier
+AbstractPool | poolifier
@@ -22,15 +22,15 @@
Type Parameters
-
-
Worker extends IWorker
+Worker extends IWorker
-
-
Data = unknown
+Data = unknown
-
-
Response = unknown
+Response = unknown
+
FixedClusterPool
+
FixedThreadPool
Implements
-- IPool<Worker, Data, Response>
@@ -53,69 +53,74 @@
Constructors
-constructor
+
Properties
-emitter?
-
filePath
-
numberOfWorkers
-
opts
-
promiseResponseMap
-
workerChoiceStrategyContext
-
workerNodes
+
Accessors
-busy
-
full
-
numberOfQueuedTasks
-
numberOfRunningTasks
-
type
+
Constructors
-
+
constructor
-
-- new AbstractPool<Worker, Data, Response>(numberOfWorkers: number, filePath: string, opts: PoolOptions<Worker>): AbstractPool<Worker, Data, Response>
+
+- new AbstractPool<Worker, Data, Response>(numberOfWorkers, filePath, opts): AbstractPool<Worker, Data, Response>
-
@@ -123,34 +128,34 @@
Type Parameters
-
-
Data = unknown
+Data = unknown
-
-
Response = unknown
+Response = unknown
Parameters
-
-
numberOfWorkers: number
+numberOfWorkers: number
-
-
filePath: string
-
-Returns AbstractPool<Worker, Data, Response>
+
Defined in src/pools/abstract-pool.ts:75
Properties
-
+
Optional
Readonly
emitter
-
+
-
+
Readonly
filePath
-filePath: string
-
Returns void
-
+
Private
checkNumberOfWorkers
-
-- checkNumberOfWorkers(numberOfWorkers: number): void
+
+- checkNumberOfWorkers(numberOfWorkers): void
-
+
numberOfWorkers: number
Returns void
-
+
Private
checkPoolOptions
-
-- checkPoolOptions(opts: PoolOptions<Worker>): void
+
+- checkPoolOptions(opts): void
+-
+
+
Returns void
+
+Private
checkValidTasksQueueOptions
+
+- checkValidTasksQueueOptions(tasksQueueOptions): void
-
+
Returns void
-
+
Private
checkValidWorkerChoiceStrategy
-
-- checkValidWorkerChoiceStrategy(workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"): void
+
+- checkValidWorkerChoiceStrategy(workerChoiceStrategy): void
-
Parameters
-
-
workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
+workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
Returns void
-
+
Protected
chooseWorkerNode
-
-- chooseWorkerNode(): [number, WorkerNode<Worker, Data>]
+
-
+
Protected
createAndSetupWorker
-
-- createAndSetupWorker(): Worker
+
+- createAndSetupWorker(): Worker
-
-
Returns Worker
-
+
Protected
Abstract
createWorker
-
-- createWorker(): Worker
+
+- createWorker(): Worker
-
-
Returns Worker
-
+
Private
dequeueTask
-
-- dequeueTask(workerNodeKey: number): undefined | Task<Data>
+
+- dequeueTask(workerNodeKey): undefined | Task<Data>
-
-
Returns undefined | Task<Data>
+Returns undefined | Task<Data>
-
+
destroy
-
-- destroy(): Promise<void>
+
+- destroy(): Promise<void>
-
-
Returns Promise<void>
-
+
Protected
Abstract
destroyWorker
-
-- destroyWorker(worker: Worker): void | Promise<void>
+
+- destroyWorker(worker): void | Promise<void>
-
@@ -456,107 +487,122 @@ Can be overridden.
Parameters
-
-
worker: Worker
+worker: Worker
-Returns void | Promise<void>
-
+
+enableTasksQueue
+
+- enableTasksQueue(enable, tasksQueueOptions?): void
+-
+
+
+
Parameters
+
+-
+
enable: boolean
+
+-
+
+
+Returns void
+
Private
enqueueTask
-
-- enqueueTask(workerNodeKey: number, task: Task<Data>): number
+
+- enqueueTask(workerNodeKey, task): number
-
Parameters
-
-
workerNodeKey: number
+workerNodeKey: number
-
-
task: Task<Data>
+task: Task<Data>
Returns number
-
+
execute
-
-- execute(data: Data): Promise<Response>
+
+- execute(data?): Promise<Response>
-
-
Returns void
-
+
Private
flushTasksQueueByWorker
-
-- flushTasksQueueByWorker(worker: Worker): void
+
+- flushTasksQueueByWorker(worker): void
-
+
worker: Worker
Returns void
-
+
+Private
flushTasksQueues
+
+- flushTasksQueues(): void
+-
+
Returns void
+
Private
getWorkerNodeKey
-
-- getWorkerNodeKey(worker: Worker): number
+
+- getWorkerNodeKey(worker): number
-
Returns number
-
+
Private
getWorkerTasksUsage
-
-- getWorkerTasksUsage(worker: Worker): undefined | TasksUsage
+
+- getWorkerTasksUsage(worker): undefined | TasksUsage
-
Parameters
-
-
worker: Worker
+worker: Worker
-
-
+
Protected
internalBusy
-
-- internalBusy(): boolean
+
+- internalBusy(): boolean
-
Returns boolean
-
+
Protected
Abstract
isMain
-
-- isMain(): boolean
+
+- isMain(): boolean
-
Returns boolean
-
+
Private
pushWorkerNode
-
-- pushWorkerNode(worker: Worker): number
+
+- pushWorkerNode(worker): number
-
Returns number
-
+
Protected
Abstract
registerWorkerMessageListener
-
-- registerWorkerMessageListener<Message>(worker: Worker, listener: ((message: MessageValue<Message, unknown>) => void)): void
+
+- registerWorkerMessageListener<Message>(worker, listener): void
-
@@ -639,36 +687,36 @@ Can be overridden.
Type Parameters
+Message
Parameters
-
-
worker: Worker
+worker: Worker
-
-
listener: ((message: MessageValue<Message, unknown>) => void)
+listener: ((message) => void)
Returns void
Returns void
-
+
Private
removeWorkerNode
-
-- removeWorkerNode(worker: Worker): void
+
+- removeWorkerNode(worker): void
-
@@ -676,16 +724,16 @@ Can be overridden.
Parameters
-
-
worker: Worker
+worker: Worker
Returns void
-
+
Protected
Abstract
sendToWorker
-
-- sendToWorker(worker: Worker, message: MessageValue<Data, unknown>): void
+
+- sendToWorker(worker, message): void
-
@@ -693,20 +741,38 @@ Can be overridden.
Parameters
-
-
worker: Worker
+worker: Worker
-
-
+
Returns void
-
+
+setTasksQueueOptions
+
+- setTasksQueueOptions(tasksQueueOptions): void
+-
+
+
+
Returns void
+
setWorkerChoiceStrategy
-
-- setWorkerChoiceStrategy(workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"): void
+
+- setWorkerChoiceStrategy(workerChoiceStrategy, workerChoiceStrategyOptions?): void
-
@@ -714,17 +780,39 @@ Can be overridden.
Parameters
-
-
workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
+workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
+-
+
+
+Returns void
+
+setWorkerChoiceStrategyOptions
+
+- setWorkerChoiceStrategyOptions(workerChoiceStrategyOptions): void
+-
+
+
Returns void
-
+
Private
setWorkerNode
-
-- setWorkerNode(workerNodeKey: number, worker: Worker, tasksUsage: TasksUsage, tasksQueue: Task<Data>[]): void
+
+- setWorkerNode(workerNodeKey, worker, tasksUsage, tasksQueue): void
-
@@ -732,28 +820,28 @@ Can be overridden.
Parameters
-
-
workerNodeKey: number
+workerNodeKey: number
-
-
worker: Worker
+worker: Worker
-
-
+
-
-
tasksQueue: Task<Data>[]
+tasksQueue: Task<Data>[]
Returns void
-
+
Private
setWorkerNodeTasksUsage
-
-- setWorkerNodeTasksUsage(workerNode: WorkerNode<Worker, Data>, tasksUsage: TasksUsage): void
+
+- setWorkerNodeTasksUsage(workerNode, tasksUsage): void
-
@@ -761,54 +849,54 @@ Can be overridden.
Parameters
Returns void
-
+
Protected
setupHook
-
-- setupHook(): void
+
+- setupHook(): void
-
Returns void
-
+
Private
tasksQueueSize
-
-- tasksQueueSize(workerNodeKey: number): number
+
+- tasksQueueSize(workerNodeKey): number
-
+
workerNodeKey: number
Returns number
-
+
Protected
workerListener
-
-- workerListener(): ((message: MessageValue<Response, unknown>) => void)
+
+- workerListener(): ((message) => void)
-
-
Returns ((message: MessageValue<Response, unknown>) => void)
+Returns ((message) => void)
-
-
-- (message: MessageValue<Response, unknown>): void
+
Returns void
+Defined in src/pools/abstract-pool.ts:504
+Theme
On This Page
+constructor
+emitter
+filePath
+numberOfWorkers
+opts
+promiseResponseMap
+workerChoiceStrategyContext
+workerNodes
+busy
+full
+numberOfQueuedTasks
+numberOfRunningTasks
+type
+afterTaskExecutionHook
+afterWorkerSetup
+beforeTaskExecutionHook
+buildTasksQueueOptions
+checkAndEmitEvents
+checkFilePath
+checkNumberOfWorkers
+checkPoolOptions
+checkValidTasksQueueOptions
+checkValidWorkerChoiceStrategy
+chooseWorkerNode
+createAndSetupWorker
+createWorker
+dequeueTask
+destroy
+destroyWorker
+enableTasksQueue
+enqueueTask
+execute
+executeTask
+flushTasksQueue
+flushTasksQueueByWorker
+flushTasksQueues
+getWorkerNodeKey
+getWorkerTasksUsage
+internalBusy
+isMain
+pushWorkerNode
+registerWorkerMessageListener
+removeWorkerNode
+sendToWorker
+setTasksQueueOptions
+setWorkerChoiceStrategy
+setWorkerChoiceStrategyOptions
+setWorkerNode
+setWorkerNodeTasksUsage
+setupHook
+tasksQueueSize
+workerListener
+PoolType
+AbstractPool
+AbstractWorker
+CircularArray
+ClusterWorker
+DynamicClusterPool
+DynamicThreadPool
+FixedClusterPool
+FixedThreadPool
+PoolEmitter
+ThreadWorker
+WorkerChoiceStrategyContext
+ClusterPoolOptions
+IPool
+IWorker
+IWorkerChoiceStrategy
+MessageValue
+PoolOptions
+PromiseResponseWrapper
+RequiredStatistics
+Task
+TasksQueueOptions
+TasksUsage
+WorkerChoiceStrategyOptions
+WorkerNode
+WorkerOptions
+Draft
+ErrorHandler
+ExitHandler
+KillBehavior
+MessageHandler
+OnlineHandler
+PoolEvent
+ThreadWorkerWithMessageChannel
+WorkerAsyncFunction
+WorkerChoiceStrategy
+WorkerFunction
+WorkerSyncFunction
+KillBehaviors
+PoolEvents
+WorkerChoiceStrategies
\ No newline at end of file
Type of worker which manages this pool.