com.hazelcast.cluster
Class ClusterServiceImpl
java.lang.Object
com.hazelcast.cluster.ClusterServiceImpl
- All Implemented Interfaces:
- ClusterService, com.hazelcast.nio.ConnectionListener, CoreService, EventPublishingService<MembershipEvent,MembershipListener>, ManagedService
public final class ClusterServiceImpl
- extends Object
- implements ClusterService, com.hazelcast.nio.ConnectionListener, ManagedService, EventPublishingService<MembershipEvent,MembershipListener>
SERVICE_NAME
public static final String SERVICE_NAME
- See Also:
- Constant Field Values
thisAddress
protected final com.hazelcast.nio.Address thisAddress
thisMember
protected final com.hazelcast.instance.MemberImpl thisMember
ClusterServiceImpl
public ClusterServiceImpl(com.hazelcast.instance.Node node)
init
public void init(NodeEngine nodeEngine,
Properties properties)
- Specified by:
init
in interface ManagedService
isJoinInProgress
public boolean isJoinInProgress()
checkJoinInfo
public JoinRequest checkJoinInfo(com.hazelcast.nio.Address target)
validateJoinMessage
public boolean validateJoinMessage(JoinMessage joinMessage)
throws Exception
- Throws:
Exception
heartBeater
public final void heartBeater()
removeAddress
public void removeAddress(com.hazelcast.nio.Address deadAddress)
reset
public void reset()
- Description copied from interface:
ManagedService
- reset service, back to initial state
- Specified by:
reset
in interface ManagedService
sendJoinRequest
public boolean sendJoinRequest(com.hazelcast.nio.Address toAddress,
boolean withCredentials)
connectionAdded
public void connectionAdded(com.hazelcast.nio.Connection connection)
- Specified by:
connectionAdded
in interface com.hazelcast.nio.ConnectionListener
connectionRemoved
public void connectionRemoved(com.hazelcast.nio.Connection connection)
- Specified by:
connectionRemoved
in interface com.hazelcast.nio.ConnectionListener
getNodeEngine
public com.hazelcast.spi.impl.NodeEngineImpl getNodeEngine()
sendShutdownMessage
public void sendShutdownMessage()
createMember
protected com.hazelcast.instance.MemberImpl createMember(com.hazelcast.nio.Address address,
String nodeUuid,
String ipV6ScopeId)
getMember
public com.hazelcast.instance.MemberImpl getMember(com.hazelcast.nio.Address address)
- Specified by:
getMember
in interface ClusterService
getMember
public com.hazelcast.instance.MemberImpl getMember(String uuid)
- Specified by:
getMember
in interface ClusterService
getMemberList
public Collection<com.hazelcast.instance.MemberImpl> getMemberList()
- Specified by:
getMemberList
in interface ClusterService
shutdown
public void shutdown()
- Description copied from interface:
ManagedService
- shutdown service
- Specified by:
shutdown
in interface ManagedService
getMasterAddress
public com.hazelcast.nio.Address getMasterAddress()
- Specified by:
getMasterAddress
in interface ClusterService
isMaster
public boolean isMaster()
- Specified by:
isMaster
in interface ClusterService
getThisAddress
public com.hazelcast.nio.Address getThisAddress()
- Specified by:
getThisAddress
in interface ClusterService
getLocalMember
public Member getLocalMember()
getMembers
public Set<Member> getMembers()
- Specified by:
getMembers
in interface ClusterService
getSize
public int getSize()
- Specified by:
getSize
in interface ClusterService
getClusterTime
public long getClusterTime()
- Specified by:
getClusterTime
in interface ClusterService
setMasterTime
public void setMasterTime(long masterTime)
getClusterTimeFor
public long getClusterTimeFor(long localTime)
addMembershipListener
public String addMembershipListener(MembershipListener listener)
removeMembershipListener
public boolean removeMembershipListener(String registrationId)
dispatchEvent
public void dispatchEvent(MembershipEvent event,
MembershipListener listener)
- Specified by:
dispatchEvent
in interface EventPublishingService<MembershipEvent,MembershipListener>
getClusterProxy
public Cluster getClusterProxy()
membersString
public String membersString()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013 Hazelcast, Inc.. All Rights Reserved.