Skip to content
Permalink
Browse files
Update documentation with purpose of the "cache" (#2714)
* Update documentation with purpose of the "cache"

    - Remove the TODO with an explanation that the class supports legacy
clients.

* Update core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCacheFactory.java

Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>

* Fix formatting

Co-authored-by: Ed Coleman etcoleman <edcoleman@apache.org>
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
  • Loading branch information
3 people committed May 17, 2022
1 parent e52df66 commit ed5e188a92bcd8d0be191b2d1a2380b72b2c998b
Showing 1 changed file with 6 additions and 1 deletion.
@@ -26,9 +26,14 @@

/**
* A factory for {@link ZooCache} instances.
* <p>
* Implementation note: We are using the instances map to track all the instances that have been
* created, so we can explicitly close them when the last legacy client has gone away. This is part
* of the "SingletonManager" code, and it is likely that ZooCacheFactory and ZooKeeperInstance can
* be removed when legacy client code support is no longer required.
*/
public class ZooCacheFactory {
// TODO: make this better - LRU, soft references, ...

private static Map<String,ZooCache> instances = new HashMap<>();
private static boolean enabled = true;

0 comments on commit ed5e188

Please sign in to comment.