org.apache.zookeeper.server
Class PrepRequestProcessor
java.lang.Object
java.lang.Thread
org.apache.zookeeper.server.PrepRequestProcessor
- All Implemented Interfaces:
- Runnable, RequestProcessor
public class PrepRequestProcessor
- extends Thread
- implements RequestProcessor
This request processor is generally at the start of a RequestProcessor
change. It sets up any transactions associated with requests that change the
state of the system. It counts on ZooKeeperServer to update
outstandingRequests, so that it can take into account transactions that are
in the queue to be applied when generating a transaction.
Method Summary |
protected void |
pRequest(Request request)
This method will be called inside the ProcessRequestThread, which is a
singleton, so there will be a single thread calling this code. |
void |
processRequest(Request request)
|
void |
run()
|
static void |
setFailCreate(boolean b)
method for tests to set failCreate |
void |
shutdown()
|
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 |
PrepRequestProcessor
public PrepRequestProcessor(ZooKeeperServer zks,
RequestProcessor nextProcessor)
setFailCreate
public static void setFailCreate(boolean b)
- method for tests to set failCreate
- Parameters:
b
-
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
pRequest
protected void pRequest(Request request)
throws RequestProcessor.RequestProcessorException
- This method will be called inside the ProcessRequestThread, which is a
singleton, so there will be a single thread calling this code.
- Parameters:
request
-
- Throws:
RequestProcessor.RequestProcessorException
processRequest
public void processRequest(Request request)
- Specified by:
processRequest
in interface RequestProcessor
shutdown
public void shutdown()
- Specified by:
shutdown
in interface RequestProcessor
Copyright © 2012 The Apache Software Foundation