I've been using JBossCache 1.4.x and wanted to migrate to 2.x. After going through the docs and guides I see there are many changes in the API. I've been using TreeCache.isCoordinator() and TreeCache.exists() consistently. I used the DefaultCacheFactory to create and start my cache. Based on these APIs many functionalities change in my application. 2.x is missing those APIs.
1. How can I identify whether a cache is a coordinator in 2.x ?
2. Which API should be used for cache.exists() ?
Please advice what changes needs to be done for the same. If there is any guide which helps to use the new APIs replacing the deleted APIs please give the link.
Feel free to create a JIRA to ask for those two methods in the Cache interface.
For now, you can use Cache.getRoot().hasChild() instead of exists(), and you can check whether you are the coordinator by doing Cache.getMembers() and checking if your address is the first one in the list.