com.hazelcast.client.spi
Interface ClientClusterService

All Known Implementing Classes:
ClientClusterServiceImpl, ClusterListenerSupport

public interface ClientClusterService

Author:
mdogan 5/16/13

Method Summary
 String addMembershipListener(MembershipListener listener)
           
 long getClusterTime()
          Returns the cluster-time.
 Client getLocalClient()
           
 Address getMasterAddress()
          Returns the address of the master member.
 MemberImpl getMember(Address address)
          Gets the member for the given address.
 MemberImpl getMember(String uuid)
          Gets the member with the given uuid.
 Collection<MemberImpl> getMemberList()
          Gets the collection of members.
 Address getOwnerConnectionAddress()
          Owner connection is opened to owner member of the client in the cluster.
 int getSize()
          Gets the current number of members.
 boolean removeMembershipListener(String registrationId)
           
 

Method Detail

getLocalClient

Client getLocalClient()
Returns:
Client interface representing local client

getMember

MemberImpl getMember(Address address)
Gets the member for the given address.

Parameters:
address - the address of the member to lookup.
Returns:
the found member, or null if not found. If address is null, null is returned.

getMember

MemberImpl getMember(String uuid)
Gets the member with the given uuid.

Parameters:
uuid - the uuid of the member
Returns:
the found member, or null if not found. If uuid is null, null is returned.

getMemberList

Collection<MemberImpl> getMemberList()
Gets the collection of members.

Returns:
the collection of member. Null will never be returned.

getMasterAddress

Address getMasterAddress()
Returns the address of the master member.

Returns:
the address of the master member. Could be null if the master is not yet known.

getSize

int getSize()
Gets the current number of members.

Returns:
the current number of members.

getClusterTime

long getClusterTime()
Returns the cluster-time.

Returns:
the cluster-time.

addMembershipListener

String addMembershipListener(MembershipListener listener)
Parameters:
listener - to be registered
Returns:
registration id

removeMembershipListener

boolean removeMembershipListener(String registrationId)
Parameters:
registrationId - of listener
Returns:
true if successfully removed, false otherwise

getOwnerConnectionAddress

Address getOwnerConnectionAddress()
Owner connection is opened to owner member of the client in the cluster. If owner member dies, other members of the cluster assumes this client dead.

Returns:
address of owner connection


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.