com.sleepycat.je.rep.elections
Class Acceptor
java.lang.Object
java.lang.Thread
com.sleepycat.je.utilint.StoppableThread
com.sleepycat.je.rep.elections.ElectionAgentThread
com.sleepycat.je.rep.elections.Acceptor
- All Implemented Interfaces:
- ExceptionListenerUser, Runnable
public class Acceptor
- extends ElectionAgentThread
Plays the role of Acceptor in the consensus algorithm. It runs in its
own thread listening for and responding to messages sent by Proposers.
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
SERVICE_NAME
public static final String SERVICE_NAME
- See Also:
- Constant Field Values
Acceptor
public Acceptor(Protocol protocol,
RepNode repNode,
Acceptor.SuggestionGenerator suggestionGenerator)
- Creates an Acceptor
run
public void run()
- The Acceptor thread body.
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
process
TextProtocol.ResponseMessage process(Protocol.Propose propose)
- Responds to a Propose request.
- Parameters:
propose - the request proposal
- Returns:
- the response: a Promise if the request was accepted, a Reject
otherwise.
process
TextProtocol.ResponseMessage process(Protocol.Accept accept)
- Responds to Accept request
- Parameters:
accept - the request
- Returns:
- an Accepted or Reject response as appropriate.
Copyright (c) 2004-2010 Oracle. All rights reserved.