fix: fix fair share algorithm implementation
[poolifier.git] / src / pools / selection-strategies / selection-strategies-types.ts
index 968d2996e0dfd05f7a21404c656010e2bdfcc92b..114ae8c555141fd08bff0103fcf79d62a65b5f83 100644 (file)
@@ -78,16 +78,20 @@ export interface IWorkerChoiceStrategy {
   readonly requiredStatistics: RequiredStatistics
   /**
    * Resets strategy internals.
+   *
+   * @returns `true` if the reset is successful, `false` otherwise.
    */
   reset: () => boolean
   /**
-   * Updates strategy internals.
+   * Updates worker node strategy internals.
    *
    * @returns `true` if the update is successful, `false` otherwise.
    */
-  update: () => boolean
+  update: (workerNodeKey: number) => boolean
   /**
    * Chooses a worker node in the pool and returns its key.
+   *
+   * @returns The worker node key.
    */
   choose: () => number
   /**