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,
Map<String,Object> attributes) |
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 |
init(NodeEngine nodeEngine,
Properties properties)
Initializes this ManagedService
|
boolean |
isJoinInProgress() |
boolean |
isMaster() |
String |
membersString() |
void |
removeAddress(com.hazelcast.nio.Address deadAddress) |
boolean |
removeMembershipListener(String registrationId) |
void |
reset()
reset this ManagedService back to initial state.
|
boolean |
sendJoinRequest(com.hazelcast.nio.Address toAddress,
boolean withCredentials) |
boolean |
sendMasterQuestion(com.hazelcast.nio.Address toAddress) |
void |
sendShutdownMessage() |
void |
setMasterTime(long masterTime) |
void |
shutdown(boolean terminate)
Shuts down this ManagedService.
|
String |
toString() |
void |
updateMemberAttribute(String uuid,
MemberAttributeOperationType operationType,
String key,
Object value) |
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)
ManagedService
init
in interface ManagedService
nodeEngine
- the NodeEngine this ManagedService belongs to.properties
- the Properties. Can be used to pass settings to the service.public boolean isJoinInProgress()
public JoinRequest checkJoinInfo(com.hazelcast.nio.Address target)
public boolean validateJoinMessage(JoinMessage joinMessage) throws Exception
Exception
public void removeAddress(com.hazelcast.nio.Address deadAddress)
public void reset()
ManagedService
reset
in interface ManagedService
public void updateMemberAttribute(String uuid, MemberAttributeOperationType operationType, String key, Object value)
public boolean sendJoinRequest(com.hazelcast.nio.Address toAddress, boolean withCredentials)
public boolean sendMasterQuestion(com.hazelcast.nio.Address toAddress)
public void connectionAdded(com.hazelcast.nio.Connection connection)
connectionAdded
in interface com.hazelcast.nio.ConnectionListener
public void connectionRemoved(com.hazelcast.nio.Connection connection)
connectionRemoved
in interface com.hazelcast.nio.ConnectionListener
public com.hazelcast.spi.impl.NodeEngineImpl getNodeEngine()
public void sendShutdownMessage()
protected com.hazelcast.instance.MemberImpl createMember(com.hazelcast.nio.Address address, String nodeUuid, String ipV6ScopeId, Map<String,Object> attributes)
public com.hazelcast.instance.MemberImpl getMember(com.hazelcast.nio.Address address)
getMember
in interface ClusterService
public com.hazelcast.instance.MemberImpl getMember(String uuid)
getMember
in interface ClusterService
public Collection<com.hazelcast.instance.MemberImpl> getMemberList()
getMemberList
in interface ClusterService
public Set<Member> getMembers()
getMembers
in interface ClusterService
public void shutdown(boolean terminate)
ManagedService
shutdown
in interface ManagedService
public com.hazelcast.nio.Address getMasterAddress()
getMasterAddress
in interface ClusterService
public boolean isMaster()
isMaster
in interface ClusterService
public com.hazelcast.nio.Address getThisAddress()
getThisAddress
in interface ClusterService
public Member getLocalMember()
public int getSize()
getSize
in interface ClusterService
public long getClusterTime()
getClusterTime
in interface ClusterService
public 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 © 2014 Hazelcast, Inc.. All Rights Reserved.