Class ZooCacheFactory
- java.lang.Object
-
- org.apache.accumulo.core.fate.zookeeper.ZooCacheFactory
-
public class ZooCacheFactory extends Object
A factory forZooCache
instances.Implementation note: We were using the instances map to track all the instances that have been created, so we could explicitly close them when the SingletonManager detected that the last legacy client (using Connector/ZooKeeperInstance) has gone away. This class may no longer be needed, since the legacy client code has been removed, so long as the ZooCache instances it is tracking are managed as resources within ClientContext or ServerContext, and explicitly closed when those are closed.
-
-
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
-
-