com.sleepycat.je.rep.impl
Class GroupService

java.lang.Object
  extended by com.sleepycat.je.rep.utilint.ServiceDispatcher.ExecutingService
      extended by com.sleepycat.je.rep.impl.GroupService

public class GroupService
extends ServiceDispatcher.ExecutingService


Nested Class Summary
(package private)  class GroupService.GroupServiceRunnable
           
 
Field Summary
(package private)  RepGroupProtocol protocol
           
(package private)  RepNode repNode
           
static String SERVICE_NAME
           
 
Constructor Summary
GroupService(ServiceDispatcher dispatcher, RepNode repNode)
           
 
Method Summary
 Runnable getRunnable(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repNode

final RepNode repNode

protocol

final RepGroupProtocol protocol

SERVICE_NAME

public static final String SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

GroupService

public GroupService(ServiceDispatcher dispatcher,
                    RepNode repNode)
Method Detail

process

public TextProtocol.ResponseMessage process(RepGroupProtocol.GroupRequest groupRequest)
Wraps the replication group as currently cached on this node in a Response message and returns it.


process

public TextProtocol.ResponseMessage process(RepGroupProtocol.EnsureNode ensureNode)
Ensures that the Monitor node, as described in the request, is a member of the group.

Parameters:
ensureNode - the request message describing the monitor node
Returns:
EnsureOK message if the monitor node is already part of the rep group, or was just made a part of the replication group. It returns a Fail message if it could not be made part of the group. The message associated with the response provides further details.

process

public TextProtocol.ResponseMessage process(RepGroupProtocol.RemoveMember removeMember)
Removes a current member from the group.

Parameters:
removeMember - the request identifying the member to be removed.
Returns:
OK message if the member was removed from the group.

getRunnable

public Runnable getRunnable(SocketChannel socketChannel)
Specified by:
getRunnable in class ServiceDispatcher.ExecutingService


Copyright (c) 2004-2010 Oracle. All rights reserved.