Class ZooCacheFactory
- java.lang.Object
-
- org.apache.accumulo.core.fate.zookeeper.ZooCacheFactory
-
public class ZooCacheFactory extends Object
A factory forZooCache
instances.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.
-
-
Constructor Summary
Constructors Constructor Description ZooCacheFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZooCache
getNewZooCache(String zooKeepers, int sessionTimeout)
Always return a newZooCache
.ZooCache
getZooCache(String zooKeepers, int sessionTimeout)
Gets aZooCache
.
-
-
-
Method Detail
-
getZooCache
public ZooCache getZooCache(String zooKeepers, int sessionTimeout)
Gets aZooCache
. The same object may be returned for multiple calls with the same arguments.- Parameters:
zooKeepers
- comma-separated list of ZooKeeper host[:port]ssessionTimeout
- session timeout- Returns:
- cache object
-
-