Feature - RExecutorService.deregisterWorkers() method added. #6448

pull/6449/head
mrniko 7 days ago
parent ac2f9be1b5
commit a7a3fa5a7f

@ -471,12 +471,17 @@ public class RedissonExecutorService implements RScheduledExecutorService {
}
@Override
public void shutdown() {
public void deregisterWorkers() {
queueTransferService.remove(getName());
remoteService.deregister(RemoteExecutorService.class);
if (workersGroupListenerId != 0) {
workersTopic.removeListener(workersGroupListenerId);
}
}
@Override
public void shutdown() {
deregisterWorkers();
commandExecutor.get(commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_VOID,
"if redis.call('exists', KEYS[2]) == 0 then "

@ -202,6 +202,12 @@ public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
*/
void registerWorkers(WorkerOptions options);
/**
* Deregister all workers
*
*/
void deregisterWorkers();
/**
* Returns amount of tasks awaiting execution or currently in execution.
*

Loading…
Cancel
Save