X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FAbstractPool.html;h=3e8972e96258662bea8323a7764dbc3ab11fac57;hb=938d9c678aa8e70e5642feffb90604cf25c993fe;hp=044f4f68ed08add2a78bf75a4f9fa8876f8d96ee;hpb=e1d3eccbb484bfbe36f6dcb9c4ef22a11621a00b;p=poolifier.git
diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html
index 044f4f68..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,74 +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>
-
@@ -128,34 +128,34 @@
Type Parameters
-
-
Data = unknown
+Data = unknown
-
-
Response = unknown
+Response = unknown
Parameters
-
-
numberOfWorkers: number
+numberOfWorkers: number
-
-
filePath: string
+filePath: string
-
-
+
-Returns AbstractPool<Worker, Data, Response>
+
Defined in src/pools/abstract-pool.ts:75
Properties
-
+
Optional
Readonly
emitter
-
+
-
+
Readonly
filePath
-filePath: string
+filePath: string
-
+
Readonly
numberOfWorkers
-numberOfWorkers: number
+numberOfWorkers: number
-
+
-
+
Protected
promiseResponseMap
-
+
-
+
Protected
workerChoiceStrategyContext
-
+
-
+
+Defined in src/pools/abstract-pool.ts:39
Accessors
-
+
Protected
Abstract
busy
-
+
- get busy(): boolean
-
Returns boolean
-
+
Protected
Abstract
full
-
+
- get full(): boolean
-
Returns boolean
-
+
Private
numberOfQueuedTasks
-
+
- get numberOfQueuedTasks(): number
-
Returns number
-
+
Private
numberOfRunningTasks
-
+
- get numberOfRunningTasks(): number
-
Returns number
-
+
+Defined in src/pools/abstract-pool.ts:180
Methods
-
+
Protected
afterTaskExecutionHook
-
-- afterTaskExecutionHook(worker: Worker, message: MessageValue<Response, unknown>): void
+
+- afterTaskExecutionHook(worker, message): void
-
Returns void
-
+
Protected
Abstract
afterWorkerSetup
-
-- afterWorkerSetup(worker: Worker): void
+
+- afterWorkerSetup(worker): void
-
Returns void
-
+
Protected
beforeTaskExecutionHook
-
-- beforeTaskExecutionHook(workerNodeKey: number): void
+
+- beforeTaskExecutionHook(workerNodeKey): void
-
Returns void
-
+
Private
buildTasksQueueOptions
-
+
-
+
Private
checkAndEmitEvents
-
-- checkAndEmitEvents(): void
+
+- checkAndEmitEvents(): void
-
Returns void
-
+
Private
checkFilePath
-
-- checkFilePath(filePath: string): void
+
+- checkFilePath(filePath): void
-
+
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: TasksQueueOptions): void
+
+- 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>
-
@@ -487,16 +487,16 @@ Can be overridden.
Parameters
-
-
worker: Worker
+worker: Worker
-Returns void | Promise<void>
-
+
enableTasksQueue
-
-- enableTasksQueue(enable: boolean, tasksQueueOptions?: TasksQueueOptions): void
+
+- enableTasksQueue(enable, tasksQueueOptions?): void
-
@@ -504,112 +504,105 @@ Can be overridden.
Parameters
-
-
enable: boolean
+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
-
-
-
+
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
-
@@ -694,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
-
@@ -731,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
-
@@ -748,20 +741,20 @@ Can be overridden.
Parameters
-
-
worker: Worker
+worker: Worker
-
-
+
Returns void
-
+
setTasksQueueOptions
-
-- setTasksQueueOptions(tasksQueueOptions: TasksQueueOptions): void
+
+- setTasksQueueOptions(tasksQueueOptions): void
-
@@ -769,17 +762,17 @@ Can be overridden.
Parameters
Returns void
-
+
setWorkerChoiceStrategy
-
-- setWorkerChoiceStrategy(workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN", workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions): void
+
+- setWorkerChoiceStrategy(workerChoiceStrategy, workerChoiceStrategyOptions?): void
-
@@ -787,21 +780,21 @@ 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: WorkerChoiceStrategyOptions): void
+
+- setWorkerChoiceStrategyOptions(workerChoiceStrategyOptions): void
-
@@ -809,17 +802,17 @@ Can be overridden.
Parameters
Returns void
-
+
Private
setWorkerNode
-
-- setWorkerNode(workerNodeKey: number, worker: Worker, tasksUsage: TasksUsage, tasksQueue: Task<Data>[]): void
+
+- setWorkerNode(workerNodeKey, worker, tasksUsage, tasksQueue): void
-
@@ -827,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
-
@@ -856,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.