From 3f7dc2a8b284c35374de03c58f11a02f1330f8ca Mon Sep 17 00:00:00 2001 From: Peng Junzhi <78788603+Pengzna@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:58:44 -0600 Subject: [PATCH] fix(server): make CacheManager constructor private to satisfy the singleton pattern (#2432) --- .../java/org/apache/hugegraph/backend/cache/CacheManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java index dd1b4f9b5f..afe540d2f1 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java @@ -56,7 +56,7 @@ public static boolean cacheEnableMetrics(String name, boolean enabled) { return cache.enableMetrics(enabled); } - public CacheManager() { + private CacheManager() { this.caches = new ConcurrentHashMap<>(); this.timer = new Timer("cache-expirer", true);