|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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)
|
Cluster |
getClusterProxy()
|
long |
getClusterTime()
Returns the cluster-time. |
long |
getClusterTimeFor(long localTime)
|
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 |
setMasterTime(long masterTime)
|
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 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 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 ManagedService
public 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 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)
ClusterService
getMember
in interface ClusterService
address
- the address of the member to lookup.
public MemberImpl getMember(String uuid)
ClusterService
getMember
in interface ClusterService
uuid
- the uuid of the member
public Collection<MemberImpl> getMemberList()
ClusterService
getMemberList
in interface ClusterService
public Set<Member> getMembers()
ClusterService
getMembers
in interface ClusterService
public void shutdown(boolean terminate)
ManagedService
shutdown
in interface ManagedService
public Address getMasterAddress()
ClusterService
getMasterAddress
in interface ClusterService
public boolean isMaster()
ClusterService
isMaster
in interface ClusterService
public Address getThisAddress()
ClusterService
getThisAddress
in interface ClusterService
public Member getLocalMember()
public int getSize()
ClusterService
getSize
in interface ClusterService
public long getClusterTime()
ClusterService
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()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |