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)
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(Address target)
public boolean validateJoinMessage(JoinMessage joinMessage) throws Exception
Exception
public void removeAddress(Address deadAddress)
public void reset()
ManagedService
reset
in interface ManagedService
public 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 ConnectionListener
public void connectionRemoved(Connection connection)
connectionRemoved
in interface ConnectionListener
public 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 ClusterService
public MemberImpl getMember(String uuid)
getMember
in interface ClusterService
public Collection<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 Address getMasterAddress()
getMasterAddress
in interface ClusterService
public boolean isMaster()
isMaster
in interface ClusterService
public 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.