public final class ClusterServiceImpl extends Object implements ClusterService, com.hazelcast.nio.ConnectionListener, ManagedService, EventPublishingService<MembershipEvent,MembershipListener>
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
protected com.hazelcast.nio.Address |
thisAddress |
protected com.hazelcast.instance.MemberImpl |
thisMember |
| Constructor and Description |
|---|
ClusterServiceImpl(com.hazelcast.instance.Node node) |
| Modifier and Type | Method and Description |
|---|---|
String |
addMembershipListener(MembershipListener listener) |
JoinRequest |
checkJoinInfo(com.hazelcast.nio.Address target) |
void |
connectionAdded(com.hazelcast.nio.Connection connection) |
void |
connectionRemoved(com.hazelcast.nio.Connection connection) |
protected com.hazelcast.instance.MemberImpl |
createMember(com.hazelcast.nio.Address address,
String nodeUuid,
String ipV6ScopeId) |
void |
dispatchEvent(MembershipEvent event,
MembershipListener listener) |
Cluster |
getClusterProxy() |
long |
getClusterTime() |
long |
getClusterTimeFor(long localTime) |
Member |
getLocalMember() |
com.hazelcast.nio.Address |
getMasterAddress() |
com.hazelcast.instance.MemberImpl |
getMember(com.hazelcast.nio.Address address) |
com.hazelcast.instance.MemberImpl |
getMember(String uuid) |
Collection<com.hazelcast.instance.MemberImpl> |
getMemberList() |
Set<Member> |
getMembers() |
com.hazelcast.spi.impl.NodeEngineImpl |
getNodeEngine() |
int |
getSize() |
com.hazelcast.nio.Address |
getThisAddress() |
void |
heartBeater() |
void |
init(NodeEngine nodeEngine,
Properties properties) |
boolean |
isJoinInProgress() |
boolean |
isMaster() |
String |
membersString() |
void |
removeAddress(com.hazelcast.nio.Address deadAddress) |
boolean |
removeMembershipListener(String registrationId) |
void |
reset()
reset service, back to initial state
|
boolean |
sendJoinRequest(com.hazelcast.nio.Address toAddress,
boolean withCredentials) |
void |
sendShutdownMessage() |
void |
setMasterTime(long masterTime) |
void |
shutdown()
shutdown service
|
String |
toString() |
boolean |
validateJoinMessage(JoinMessage joinMessage) |
public static final String SERVICE_NAME
protected final com.hazelcast.nio.Address thisAddress
protected final com.hazelcast.instance.MemberImpl thisMember
public void init(NodeEngine nodeEngine, Properties properties)
init in interface ManagedServicepublic boolean isJoinInProgress()
public JoinRequest checkJoinInfo(com.hazelcast.nio.Address target)
public boolean validateJoinMessage(JoinMessage joinMessage) throws Exception
Exceptionpublic final void heartBeater()
public void removeAddress(com.hazelcast.nio.Address deadAddress)
public void reset()
ManagedServicereset in interface ManagedServicepublic boolean sendJoinRequest(com.hazelcast.nio.Address toAddress,
boolean withCredentials)
public void connectionAdded(com.hazelcast.nio.Connection connection)
connectionAdded in interface com.hazelcast.nio.ConnectionListenerpublic void connectionRemoved(com.hazelcast.nio.Connection connection)
connectionRemoved in interface com.hazelcast.nio.ConnectionListenerpublic com.hazelcast.spi.impl.NodeEngineImpl getNodeEngine()
public void sendShutdownMessage()
protected com.hazelcast.instance.MemberImpl createMember(com.hazelcast.nio.Address address,
String nodeUuid,
String ipV6ScopeId)
public com.hazelcast.instance.MemberImpl getMember(com.hazelcast.nio.Address address)
getMember in interface ClusterServicepublic com.hazelcast.instance.MemberImpl getMember(String uuid)
getMember in interface ClusterServicepublic Collection<com.hazelcast.instance.MemberImpl> getMemberList()
getMemberList in interface ClusterServicepublic void shutdown()
ManagedServiceshutdown in interface ManagedServicepublic com.hazelcast.nio.Address getMasterAddress()
getMasterAddress in interface ClusterServicepublic boolean isMaster()
isMaster in interface ClusterServicepublic com.hazelcast.nio.Address getThisAddress()
getThisAddress in interface ClusterServicepublic Member getLocalMember()
public Set<Member> getMembers()
getMembers in interface ClusterServicepublic 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 © 2017 Hazelcast, Inc.. All Rights Reserved.