javatar
javatar

Reputation: 4621

Hazelcast issue - who to get (listen) running application number

I would like to learn whether it is possible to get or listen running applications "number" which are running on the pool IP that hazelcast is configured (distributed) for.

I am aware of the application logs that shows which ip is get in the pool right that moment or leave the pool (when that server is down). However, I could not find how to get this running instance numbers at runtime with hazelcast.

Thanks in advance.

Upvotes: 0

Views: 505

Answers (1)

Fuad Malikov
Fuad Malikov

Reputation: 2345

Hazelcast.getCluster().getMembers() 

will give you the list of members. You can also addListener to listen the membership events via

Hazelcast.getCluster().addMembershipListener() 

Upvotes: 5

Related Questions