replace with lambda (#7218)
This commit is contained in:
parent
9e1b094985
commit
c6adbcaa20
@ -735,9 +735,7 @@ public class ClientWorker implements Closeable {
|
||||
|
||||
@Override
|
||||
public void startInternal() throws NacosException {
|
||||
executor.schedule(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
executor.schedule(() -> {
|
||||
while (!executor.isShutdown() && !executor.isTerminated()) {
|
||||
try {
|
||||
listenExecutebell.poll(5L, TimeUnit.SECONDS);
|
||||
@ -749,7 +747,6 @@ public class ClientWorker implements Closeable {
|
||||
LOGGER.error("[ rpc listen execute ] [rpc listen] exception", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 0L, TimeUnit.MILLISECONDS);
|
||||
|
||||
}
|
||||
@ -788,7 +785,7 @@ public class ClientWorker implements Closeable {
|
||||
if (!cache.isUseLocalConfigInfo()) {
|
||||
List<CacheData> cacheDatas = listenCachesMap.get(String.valueOf(cache.getTaskId()));
|
||||
if (cacheDatas == null) {
|
||||
cacheDatas = new LinkedList<CacheData>();
|
||||
cacheDatas = new LinkedList<>();
|
||||
listenCachesMap.put(String.valueOf(cache.getTaskId()), cacheDatas);
|
||||
}
|
||||
cacheDatas.add(cache);
|
||||
@ -799,7 +796,7 @@ public class ClientWorker implements Closeable {
|
||||
if (!cache.isUseLocalConfigInfo()) {
|
||||
List<CacheData> cacheDatas = removeListenCachesMap.get(String.valueOf(cache.getTaskId()));
|
||||
if (cacheDatas == null) {
|
||||
cacheDatas = new LinkedList<CacheData>();
|
||||
cacheDatas = new LinkedList<>();
|
||||
removeListenCachesMap.put(String.valueOf(cache.getTaskId()), cacheDatas);
|
||||
}
|
||||
cacheDatas.add(cache);
|
||||
|
Loading…
Reference in New Issue
Block a user