X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=071c59d5926ddfbe3a763dd6300d28b8d70476e5;hb=94ab998f44abe7ed2184a0702c45621b06f5641f;hp=39bf3862b55dde4572e9e3f553d8d0e96955d5d7;hpb=7e2a464b15953320c79646e2ff88d953db4e5b96;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 39bf3862..071c59d5 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,11 +1,13 @@ IPool | poolifier
-
+
@@ -32,34 +34,57 @@
  • IPool
+
  • Defined in src/pools/pool.ts:66
  • -

    Methods

    -
    +

    Properties

    +
    -
      - +
      destroy: (() => Promise<void>)
      +
      +

      Type declaration

      +
        +
      • +
          +
        • (): Promise<void>
        • Shutdowns every current worker in this pool.

          -

          Returns Promise<void>

    -
    +
  • Defined in src/pools/pool.ts:86
  • +
    + +
    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.
    • +
    +
    +
    -
      - +
      execute: ((data: Data) => Promise<Response>)
      +
      +

      Type declaration

      +
        +
      • +
          +
        • (data: Data): Promise<Response>
        • Performs the task specified in the constructor with the data parameter.

          @@ -72,13 +97,18 @@
          data: Data

          The input for the specified task. This can only be serializable data.

      -

      Returns Promise<Response>

    -
    +
  • Defined in src/pools/pool.ts:82
  • +
    -
      - +
      setWorkerChoiceStrategy: ((workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN") => void)
      +
      +

      Type declaration

      +
        +
      • +
          +
        • (workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"): void
        • Sets the worker choice strategy in this pool.

          @@ -86,12 +116,12 @@

          Parameters

          • -
            workerChoiceStrategy: "ROUND_ROBIN" | "LESS_RECENTLY_USED" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
            +
            workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"

            The worker choice strategy.

      -

      Returns void

    +
  • Defined in src/pools/pool.ts:92
  • +
  • destroy
  • +
  • emitter?
  • +
  • execute
  • +
  • setWorkerChoiceStrategy
  • Generated using TypeDoc

    \ No newline at end of file