+export interface RequiredStatistics {
+ /**
+ * Require tasks run time.
+ */
+ runTime: boolean
+ /**
+ * Require tasks average run time.
+ */
+ avgRunTime: boolean
+ /**
+ * Require tasks median run time.
+ */
+ medRunTime: boolean
+}
+
+/**
+ * Worker choice strategy interface.
+ */
+export interface IWorkerChoiceStrategy {
+ /**
+ * Required tasks usage statistics.
+ */
+ readonly requiredStatistics: RequiredStatistics
+ /**
+ * Resets strategy internals.
+ *
+ * @returns `true` if the reset is successful, `false` otherwise.
+ */
+ reset: () => boolean
+ /**
+ * Updates the worker node key strategy internals.
+ *
+ * @returns `true` if the update is successful, `false` otherwise.
+ */
+ update: (workerNodeKey: number) => boolean
+ /**
+ * Chooses a worker node in the pool and returns its key.
+ *
+ * @returns The worker node key.
+ */
+ choose: () => number