X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=b81dba1f78e565d1768cfd7e580831278660bca7;hb=8bd0b5363ad2defbce7c1cc49e616c24ad135dde;hp=a365532216bb8e1ff0dd64294b0e1c5c5dced6d8;hpb=a76fac14098cf2138cf8d6997ac7c89d8c3ae508;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index a3655322..b81dba1f 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,11 +1,13 @@ IPool | poolifier
-
+
@@ -32,36 +34,58 @@
  • IPool
+
  • Defined in src/pools/pool.ts:53
  • -

    Methods

    -
    +

    Properties

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

      Type declaration

      +
        +
      • +
          +
        • (): Promise<void>
        • -

          Shut down every current worker in this pool.

          +

          Shutdowns every current worker in this pool.

          -

          Returns Promise<void>

    -
    +
  • Defined in src/pools/pool.ts:72
  • +
    + +
    emitter?: PoolEmitter
    +

    Emitter on which events can be listened to.

    +

    Events that can currently be listened to:

    +
      +
    • 'busy'
    • +
    +
    +
    -
      - +
      execute: ((data: Data) => Promise<Response>)
      +
      +

      Type declaration

      +
        +
      • +
          +
        • (data: Data): Promise<Response>
        • -

          Perform the task specified in the constructor with the data parameter.

          +

          Performs the task specified in the constructor with the data parameter.

          Returns

          Promise that will be resolved when the task is successfully completed.

          @@ -72,26 +96,31 @@
          data: Data

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

      -

      Returns Promise<Response>

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

      Type declaration

      +
        +
      • +
          +
        • (workerChoiceStrategy: "ROUND_ROBIN" | "LESS_RECENTLY_USED" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"): void
        • -

          Set the worker choice strategy in this pool.

          +

          Sets the worker choice strategy in this pool.

          Parameters

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

            The worker choice strategy.

          -

          Returns void

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

    \ No newline at end of file