Reputation: 71
Do i need to create separate instances of Curator framework for each of the recipies i want to implement in my project? For example Do i need to create separate CuratorFramework instance for LeaderElection and separate CuratorFramework instance for Distributed Locks/Queues?
Regards Sundar
Upvotes: 1
Views: 886
Reputation: 2956
No, the CuratorFramework instance is re-usable, thread safe, etc. Create one CuratorFramework instance per server connection (just like you'd create one ZooKeeper instance per server connection) and use it for all of your recipes, etc. (NOTE: I'm the lead for Apache Curator).
Upvotes: 2