Response = unknown
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
- implements IWorkerChoiceStrategy<Worker, Data, Response> {
+ implements IWorkerChoiceStrategy {
/**
* Id of the next worker.
*/
private nextWorkerId: number = 0
- /** {@inheritDoc} */
+ /** @inheritDoc */
public reset (): boolean {
this.nextWorkerId = 0
return true
}
- /** {@inheritDoc} */
+ /** @inheritDoc */
public choose (): number {
const chosenWorkerKey = this.nextWorkerId
this.nextWorkerId =
return chosenWorkerKey
}
- /** {@inheritDoc} */
+ /** @inheritDoc */
public remove (workerKey: number): boolean {
if (this.nextWorkerId === workerKey) {
if (this.pool.workers.length === 0) {