public class Acceptor extends ElectionAgentThread
Modifier and Type | Class and Description |
---|---|
static interface |
Acceptor.SuggestionGenerator |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_NAME |
channelQueue, formatter, logger, protocol
envImpl
Constructor and Description |
---|
Acceptor(Protocol protocol,
RepNode repNode,
Acceptor.SuggestionGenerator suggestionGenerator)
Creates an Acceptor
|
Modifier and Type | Method and Description |
---|---|
(package private) TextProtocol.ResponseMessage |
process(Protocol.Accept accept)
Responds to Accept request
|
(package private) TextProtocol.ResponseMessage |
process(Protocol.Propose propose)
Responds to a Propose request.
|
void |
run()
The Acceptor thread body.
|
getLogger, initiateSoftShutdown, shutdown
cleanup, getSavedShutdownException, getTotalCpuTime, getTotalUserTime, isShutdown, saveShutdownException, setExceptionListener, shutdownDone, shutdownThread
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
public static final java.lang.String SERVICE_NAME
public Acceptor(Protocol protocol, RepNode repNode, Acceptor.SuggestionGenerator suggestionGenerator)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
TextProtocol.ResponseMessage process(Protocol.Propose propose)
propose
- the request proposalTextProtocol.ResponseMessage process(Protocol.Accept accept)
accept
- the requestCopyright (c) 2004-2012 Oracle. All rights reserved.