|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.fostore.RequestHandler
org.apache.jdo.impl.fostore.DumpHandler
Process dump requests. A dump request provides information about the store. Currently, two options are supported:
className
.
DumpOption
Nested Class Summary | |
(package private) class |
DumpHandler.ClassHandler
Abstract OptionHandler that assists in dumping information about classes. |
(package private) class |
DumpHandler.ClassMetadataHandler
OptionHandler that dumps metadata about a class. |
(package private) class |
DumpHandler.ClassSubclassesHandler
OptionHandler that dumps information about the subclasses of a class. |
(package private) class |
DumpHandler.DBInfoHandler
OptionHandler that dumps DBInfo. |
(package private) class |
DumpHandler.DumpOptionSubHandler
Abstract class for dumping database information. |
(package private) static interface |
RequestHandler.HandlerFactory
Means by which subclasses are created. |
Field Summary | |
protected FOStoreServerConnection |
con
Connection on which the Request arrived. |
static RequestHandler.HandlerFactory |
factory
|
protected int |
length
Length of the data in the Request. |
(package private) static org.apache.commons.logging.Log |
logger
Logger |
private static org.apache.jdo.util.I18NHelper |
msg
I18N support. |
private static java.util.HashMap |
optionTable
Maps DumpOptions to
DumpOptionSubHandlers . |
protected Reply |
reply
Subclasses use this Reply instance to send data back to their corresponding client-side request. |
private java.util.ArrayList |
results
List of results. |
private Status |
status
Return status. |
Constructor Summary | |
private |
DumpHandler(Reply reply,
int length,
FOStoreServerConnection con)
|
Method Summary | |
protected boolean |
getOkToFinish()
The RollbackHandler should override this and return false, so that finishers are not run when we are rolling back. |
(package private) RequestFinisher |
handleRequest()
Subclasses implement this to take care of individiual requests. |
(package private) static void |
handleRequests(FOStoreServerConnection con)
Handles all requests that can be read at this time from the given connection. |
private void |
initOptionTable()
Initializes the optionTable . |
protected void |
setOkToCommit(boolean okToCommit)
The CommitHandler should override this and save the given value, then use it to determine whether or not to commit. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.util.HashMap optionTable
DumpOptions
to
DumpOptionSubHandlers
. The option table must match
the optionTable
in Dumper
.
Because the DumpOptionSubHandler
are bound to
the state of the enclosing DumpHander
instance, the
optionTable
has to be non-static.
private final java.util.ArrayList results
private Status status
private static final org.apache.jdo.util.I18NHelper msg
public static final RequestHandler.HandlerFactory factory
protected final Reply reply
protected final int length
protected final FOStoreServerConnection con
static final org.apache.commons.logging.Log logger
Constructor Detail |
private DumpHandler(Reply reply, int length, FOStoreServerConnection con)
Method Detail |
private void initOptionTable()
optionTable
.
The option table must match the optionTable
in
Dumper
.
Dumper
RequestFinisher handleRequest() throws java.io.IOException, FOStoreDatabaseException
RequestHandler
handleRequest
in class RequestHandler
java.io.IOException
FOStoreDatabaseException
protected boolean getOkToFinish()
protected void setOkToCommit(boolean okToCommit)
static void handleRequests(FOStoreServerConnection con)
The data it generates for the client is documented; see ReplyHandler.processReplies(java.io.DataInput, org.apache.jdo.impl.fostore.Message)
.
If after all requests are thusly handled, none have indicated that the second round of handling, called finishing, is not to be done, then performs this second round. The finishers that are invoked are precisely those which were returned from each request's handleRequest invocation, and the finishers have their finish() methods invoked in the same order in which the requests were originally invoked.
Finally, writes the number of replies (at the beginning of the reply data, in a spot that was set aside for this purpose), and sends replies back to the client.
This method is very paranoid about error checking, which clutters it up some, but is necessary to ensure that the server keeps running.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |