test: enchance worker node key choice tests
[poolifier.git] / src / pools / selection-strategies / selection-strategies-types.ts
index 968d2996e0dfd05f7a21404c656010e2bdfcc92b..b95cf7f3ae22b6338fcf48940415e23337307715 100644 (file)
@@ -78,20 +78,24 @@ export interface IWorkerChoiceStrategy {
   readonly requiredStatistics: RequiredStatistics
   /**
    * Resets strategy internals.
+   *
+   * @returns `true` if the reset is successful, `false` otherwise.
    */
   reset: () => boolean
   /**
-   * Updates strategy internals.
+   * Updates the worker node key 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
   /**
-   * Removes a worker node key from strategy internals.
+   * Removes the worker node key from strategy internals.
    *
    * @param workerNodeKey - The worker node key.
    * @returns `true` if the worker node key is removed, `false` otherwise.