|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cluster
Hazelcast cluster interface. It provides access to the members in the cluster and one can register for changes in the cluster members.
All the methods on the Cluster are thread-safe.
Method Summary | |
---|---|
String |
addMembershipListener(MembershipListener listener)
Adds MembershipListener to listen for membership updates. |
long |
getClusterTime()
Returns the cluster-wide time in milliseconds. |
Member |
getLocalMember()
Returns this Hazelcast instance member. |
Set<Member> |
getMembers()
Set of the current members in the cluster. |
boolean |
removeMembershipListener(String registrationId)
Removes the specified MembershipListener. |
Method Detail |
---|
String addMembershipListener(MembershipListener listener)
removeMembershipListener(String)
method.
If the MembershipListener implements the InitialMembershipListener
interface, it will also receive
the InitialMembershipEvent
.
There is no check for duplicate registrations, so if you register the listener twice, it will get events twice.
listener
- membership listener
NullPointerException
- if listener is null.removeMembershipListener(String)
boolean removeMembershipListener(String registrationId)
registrationId
- the registrationId of MembershipListener to remove.
NullPointerException
- if the registration id is null.addMembershipListener(MembershipListener)
Set<Member> getMembers()
Member getLocalMember()
long getClusterTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |