Hi guys,
I'm looking at using Leader Latch and I noticed it only has polling mechanisms for figuring out if you are the leader. I was wondering if there is a reason to not have a callback mechanism that you can register with two methods:
startBeingMaster();
stopBeingMaster();
Basically, any time setLeadership() is called with a value other than what it was, it would cause either startBeingMaster() to be called or stopBeingMaster() to be called.
I can effect this using an extra thread and the polling mechanisms that are there, but am wondering if I'm the only one that would prefer to interact with it in this way or if others would also prefer to have access to this type of API?
(Btw, for anyone wondering, I'm currently swapping out an old zookeeper client library for Curator and that's why I have all of these random questions about APIs and stuff)
--Eric