|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.cluster.impl.ClusterServiceImpl
public final class ClusterServiceImpl
| Field Summary | |
|---|---|
static String |
SERVICE_NAME
|
protected Address |
thisAddress
|
protected MemberImpl |
thisMember
|
| Constructor Summary | |
|---|---|
ClusterServiceImpl(Node node)
|
|
| Method Summary | |
|---|---|
void |
acceptMasterConfirmation(MemberImpl member)
|
String |
addMembershipListener(MembershipListener listener)
|
void |
answerMasterQuestion(JoinMessage joinMessage)
|
JoinRequest |
checkJoinInfo(Address target)
|
void |
connectionAdded(Connection connection)
|
void |
connectionRemoved(Connection connection)
|
protected MemberImpl |
createMember(Address address,
String nodeUuid,
String ipV6ScopeId,
Map<String,Object> attributes)
|
void |
dispatchEvent(MembershipEvent event,
MembershipListener listener)
|
ClusterClockImpl |
getClusterClock()
Returns the ClusterClock of the cluster. |
Cluster |
getClusterProxy()
|
Member |
getLocalMember()
|
Address |
getMasterAddress()
Returns the address of the master member. |
MemberImpl |
getMember(Address address)
Gets the member for the given address. |
MemberImpl |
getMember(String uuid)
Gets the member with the given uuid. |
Collection<MemberImpl> |
getMemberList()
Gets the collection of members. |
Set<Member> |
getMembers()
Returns a collection of all members part of the cluster. |
NodeEngineImpl |
getNodeEngine()
|
int |
getSize()
Gets the current number of members. |
Address |
getThisAddress()
Gets the address of this member. |
void |
handleJoinRequest(JoinRequest joinRequest,
Connection connection)
|
void |
handleMaster(Address masterAddress,
Address callerAddress)
|
void |
init(NodeEngine nodeEngine,
Properties properties)
Initializes this ManagedService |
boolean |
isJoinInProgress()
|
boolean |
isMaster()
Checks if this member is the master. |
String |
membersString()
|
void |
merge(Address newTargetAddress)
|
void |
prepareToMerge(Address newTargetAddress)
|
void |
removeAddress(Address deadAddress)
|
boolean |
removeMembershipListener(String registrationId)
|
void |
reset()
reset this ManagedService back to initial state. |
boolean |
sendJoinRequest(Address toAddress,
boolean withCredentials)
|
boolean |
sendMasterQuestion(Address toAddress)
|
void |
sendShutdownMessage()
|
void |
shutdown(boolean terminate)
Shuts down this ManagedService. |
String |
toString()
|
void |
updateMemberAttribute(String uuid,
MemberAttributeOperationType operationType,
String key,
Object value)
|
void |
updateMembers(Collection<MemberInfo> members)
|
boolean |
validateJoinMessage(JoinMessage joinMessage)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String SERVICE_NAME
protected final Address thisAddress
protected final MemberImpl thisMember
| Constructor Detail |
|---|
public ClusterServiceImpl(Node node)
| Method Detail |
|---|
public ClusterClockImpl getClusterClock()
ClusterServiceClusterClock of the cluster.
The returned value will never be null and will never change.
getClusterClock in interface ClusterService
public void init(NodeEngine nodeEngine,
Properties properties)
ManagedService
init in interface ManagedServicenodeEngine - the NodeEngine that 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 answerMasterQuestion(JoinMessage joinMessage)
public void handleJoinRequest(JoinRequest joinRequest,
Connection connection)
public void handleMaster(Address masterAddress,
Address callerAddress)
public void acceptMasterConfirmation(MemberImpl member)
public void prepareToMerge(Address newTargetAddress)
public void merge(Address newTargetAddress)
public void reset()
ManagedService
reset in interface ManagedServicepublic void updateMembers(Collection<MemberInfo> members)
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 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)
ClusterService
getMember in interface ClusterServiceaddress - the address of the member to lookup.
public MemberImpl getMember(String uuid)
ClusterService
getMember in interface ClusterServiceuuid - the uuid of the member
public Collection<MemberImpl> getMemberList()
ClusterService
getMemberList in interface ClusterServicepublic Set<Member> getMembers()
ClusterService
getMembers in interface ClusterServicepublic void shutdown(boolean terminate)
ManagedService
shutdown in interface ManagedServiceterminate - true to shut down the ManagedServicepublic Address getMasterAddress()
ClusterService
getMasterAddress in interface ClusterServicepublic boolean isMaster()
ClusterService
isMaster in interface ClusterServicepublic Address getThisAddress()
ClusterService
getThisAddress in interface ClusterServicepublic Member getLocalMember()
public int getSize()
ClusterService
getSize in interface ClusterServicepublic 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()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||