X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=c06cfb370a722aeda2e2740cfb67659e8b86d730;hb=40baeb4e66efa6646d3221029cd012fb7bda8955;hp=7d7441fb31e1b7453498ab93bf5003e5953777ee;hpb=fe9f25b5ac98c7c7fccd1849a200c5054a77cf03;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 7d7441fb..c06cfb37 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,11 +1,13 @@ IPool | poolifier
-
+
@@ -32,36 +34,59 @@
  • IPool
+
  • Defined in src/pools/pool.ts:80
  • -

    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:100
  • +
    + +
    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>
        • -

          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 +97,31 @@
          data: Data

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

      -

      Returns Promise<Response>

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

          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_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"

            The worker choice strategy.

          -

          Returns void

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

    \ No newline at end of file