public class GroupService extends ServiceDispatcher.ExecutingService
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| Constructor and Description |
|---|
GroupService(ServiceDispatcher dispatcher,
RepNode repNode) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancel()
Cancel the service as part of the registration being canceled.
|
Runnable |
getRunnable(DataChannel dataChannel) |
TextProtocol.ResponseMessage |
process(RepGroupProtocol.DeleteMember deleteMember)
Deletes a current member from the group, which marks the node as removed
and deletes its entry from the rep group DB.
|
TextProtocol.ResponseMessage |
process(RepGroupProtocol.EnsureNode ensureNode)
Ensures that the Monitor node, as described in the request, is a member
of the group.
|
TextProtocol.ResponseMessage |
process(RepGroupProtocol.GroupRequest groupRequest)
Wraps the replication group as currently cached on this node in
a Response message and returns it.
|
TextProtocol.ResponseMessage |
process(RepGroupProtocol.RemoveMember removeMember)
Removes a current member from the group.
|
TextProtocol.ResponseMessage |
process(RepGroupProtocol.TransferMaster transferMaster)
Transfer the master role from the current master to one of the specified
replicas.
|
TextProtocol.ResponseMessage |
process(RepGroupProtocol.UpdateAddress updateAddress)
Update the network address for a dead replica.
|
ensureChannelBlockingpublic static final String SERVICE_NAME
public GroupService(ServiceDispatcher dispatcher, RepNode repNode)
protected void cancel()
cancel in class ServiceDispatcher.ExecutingServicepublic TextProtocol.ResponseMessage process(RepGroupProtocol.GroupRequest groupRequest)
public TextProtocol.ResponseMessage process(RepGroupProtocol.EnsureNode ensureNode)
ensureNode - the request message describing the monitor nodepublic TextProtocol.ResponseMessage process(RepGroupProtocol.RemoveMember removeMember)
removeMember - the request identifying the member to be removed.public TextProtocol.ResponseMessage process(RepGroupProtocol.DeleteMember deleteMember)
deleteMember - the request identifying the member to be deletedpublic TextProtocol.ResponseMessage process(RepGroupProtocol.UpdateAddress updateAddress)
updateAddress - the request identifying the new network address for
the node.public TextProtocol.ResponseMessage process(RepGroupProtocol.TransferMaster transferMaster)
transferMaster - the request identifying nodes to be considered for
the role of new masterpublic Runnable getRunnable(DataChannel dataChannel)
getRunnable in class ServiceDispatcher.ExecutingServiceCopyright © 2024. All rights reserved.