public class GroupService extends ServiceDispatcher.ExecutingService
Modifier and Type | Class and Description |
---|---|
(package private) class |
GroupService.GroupServiceRunnable |
Modifier and Type | Field and Description |
---|---|
(package private) RepGroupProtocol |
protocol |
(package private) RepNode |
repNode |
static java.lang.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.
|
java.lang.Runnable |
getRunnable(java.nio.channels.SocketChannel socketChannel) |
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.
|
final RepNode repNode
final RepGroupProtocol protocol
public static final java.lang.String SERVICE_NAME
public GroupService(ServiceDispatcher dispatcher, RepNode repNode)
protected void cancel()
cancel
in class ServiceDispatcher.ExecutingService
public 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.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 java.lang.Runnable getRunnable(java.nio.channels.SocketChannel socketChannel)
getRunnable
in class ServiceDispatcher.ExecutingService
Copyright (c) 2004-2012 Oracle. All rights reserved.