public final class ClusterServiceImpl extends Object implements ClusterService, ConnectionListener, ManagedService, EventPublishingService<MembershipEvent,MembershipListener>
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
protected Address |
thisAddress |
protected MemberImpl |
thisMember |
| Constructor and Description |
|---|
ClusterServiceImpl(Node node) |
public static final String SERVICE_NAME
protected final Address thisAddress
protected final MemberImpl thisMember
public ClusterServiceImpl(Node node)
public void init(NodeEngine nodeEngine, Properties properties)
ManagedServiceinit in interface ManagedServicenodeEngine - the NodeEngine this ManagedService belongs to.properties - the Properties. Can be used to pass settings to the service.public boolean isJoinInProgress()
public JoinRequest checkJoinInfo(Address target)
public boolean validateJoinMessage(JoinMessage joinMessage) throws Exception
Exceptionpublic void removeAddress(Address deadAddress)
public void reset()
ManagedServicereset in interface ManagedServicepublic void updateMemberAttribute(String uuid, MemberAttributeOperationType operationType, String key, Object value)
public boolean sendJoinRequest(Address toAddress, boolean withCredentials)
public boolean sendMasterQuestion(Address toAddress)
public void connectionAdded(Connection connection)
connectionAdded in interface ConnectionListenerpublic void connectionRemoved(Connection connection)
connectionRemoved in interface ConnectionListenerpublic NodeEngineImpl getNodeEngine()
public void sendShutdownMessage()
protected MemberImpl createMember(Address address, String nodeUuid, String ipV6ScopeId, Map<String,Object> attributes)
public MemberImpl getMember(Address address)
getMember in interface ClusterServicepublic MemberImpl getMember(String uuid)
getMember in interface ClusterServicepublic Collection<MemberImpl> getMemberList()
getMemberList in interface ClusterServicepublic Set<Member> getMembers()
getMembers in interface ClusterServicepublic void shutdown(boolean terminate)
ManagedServiceshutdown in interface ManagedServicepublic Address getMasterAddress()
getMasterAddress in interface ClusterServicepublic boolean isMaster()
isMaster in interface ClusterServicepublic Address getThisAddress()
getThisAddress in interface ClusterServicepublic Member getLocalMember()
public int getSize()
getSize in interface ClusterServicepublic long getClusterTime()
getClusterTime in interface ClusterServicepublic void setMasterTime(long masterTime)
public long getClusterTimeFor(long localTime)
public String addMembershipListener(MembershipListener listener)
public boolean removeMembershipListener(String registrationId)
public void dispatchEvent(MembershipEvent event, MembershipListener listener)
dispatchEvent in interface EventPublishingService<MembershipEvent,MembershipListener>public Cluster getClusterProxy()
public String membersString()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.