refactoring

pull/2450/head
Nikita Koksharov 5 years ago
parent 8310ce1bc0
commit 4dcc0e7a9f

@ -131,7 +131,7 @@ public class ScheduledTasksService extends TasksService {
if (requestId == null) {
byte[] id = new byte[17];
ThreadLocalRandom.current().nextBytes(id);
id[0] = 1;
id[0] = 01;
return new RequestId(id);
}
return requestId;

@ -30,6 +30,7 @@ import org.redisson.remote.*;
import java.util.Arrays;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
/**
@ -171,6 +172,14 @@ public class TasksService extends BaseRemoteService {
taskId.toString(), RedissonExecutorService.SHUTDOWN_STATE, RedissonExecutorService.TERMINATED_STATE);
}
@Override
protected RequestId generateRequestId() {
byte[] id = new byte[17];
ThreadLocalRandom.current().nextBytes(id);
id[0] = 00;
return new RequestId(id);
}
public RFuture<Boolean> cancelExecutionAsync(final RequestId requestId) {
final RPromise<Boolean> result = new RedissonPromise<Boolean>();

@ -186,9 +186,8 @@ public abstract class BaseRemoteService {
}
protected RequestId generateRequestId() {
byte[] id = new byte[17];
byte[] id = new byte[16];
ThreadLocalRandom.current().nextBytes(id);
id[0] = 00;
return new RequestId(id);
}

Loading…
Cancel
Save