This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 41e7805d4 [ISSUE #3414]Replace this lambda with method reference
'Registry::registryBuilder'.
41e7805d4 is described below
commit 41e7805d43d4236e7daca970037dcd0b08624d4f
Author: pandaapo <[email protected]>
AuthorDate: Mon Apr 24 16:18:08 2023 +0800
[ISSUE #3414]Replace this lambda with method reference
'Registry::registryBuilder'.
---
.../main/java/org/apache/eventmesh/runtime/registry/Registry.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/registry/Registry.java
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/registry/Registry.java
index 2787dd95f..8a7ff4500 100644
---
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/registry/Registry.java
+++
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/registry/Registry.java
@@ -52,7 +52,7 @@ public class Registry {
}
public static Registry getInstance(String registryPluginType) {
- return REGISTRY_CACHE.computeIfAbsent(registryPluginType, key ->
registryBuilder(key));
+ return REGISTRY_CACHE.computeIfAbsent(registryPluginType,
Registry::registryBuilder);
}
private static Registry registryBuilder(String registryPluginType) {
@@ -82,13 +82,15 @@ public class Registry {
registryService.start();
}
- public synchronized void shutdown() throws RegistryException {
+ public void shutdown() throws RegistryException {
inited.compareAndSet(true, false);
started.compareAndSet(true, false);
if (!shutdown.compareAndSet(false, true)) {
return;
}
- registryService.shutdown();
+ synchronized (this) {
+ registryService.shutdown();
+ }
}
public List<EventMeshDataInfo> findEventMeshInfoByCluster(String
clusterName) throws RegistryException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]