|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Proc
org.basex.core.Command
org.basex.core.cmd.ACreate
org.basex.core.cmd.OptimizeAll
public final class OptimizeAll
Evaluates the 'optimize all' command and rebuilds all data structures of the currently opened database. This effectively eliminates all fragmentation and can lead to significant space savings after updates.
Field Summary |
---|
Fields inherited from class org.basex.core.Command |
---|
args, context, in, mprop, out, perf, prop |
Fields inherited from class org.basex.core.Proc |
---|
listen, updating |
Constructor Summary | |
---|---|
OptimizeAll()
Default constructor. |
Method Summary | |
---|---|
void |
build(CmdBuilder cb)
Builds a string representation from the command. |
void |
databases(LockResult lr)
Adds the names of the databases that may be touched by the process. |
java.lang.String |
det()
Returns short information on this process. |
boolean |
newData(Context ctx)
Closes an open data reference and returns true if this command will change
the Context.data reference. |
static void |
optimizeAll(Data data,
Context ctx,
OptimizeAll cmd)
Optimizes all data structures and closes the database. |
double |
prog()
Returns a progress value (0 - 1). |
protected boolean |
run()
Executes the command and serializes the result (internal call). |
boolean |
stoppable()
Returns true if this command can be stopped. |
Methods inherited from class org.basex.core.cmd.ACreate |
---|
create, drop, sourceToIO, supportsProg |
Methods inherited from class org.basex.core.Command |
---|
close, databases, error, execute, execute, getOption, getOption, info, info, result, run, run, setInput, setInput, toString, updated, updating |
Methods inherited from class org.basex.core.Proc |
---|
abort, checkStop, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OptimizeAll()
Method Detail |
---|
protected boolean run()
Command
run
in class Command
public boolean newData(Context ctx)
Command
true
if this command will change
the Context.data
reference. This method is required by the progress dialog
in the frontend.
newData
in class ACreate
ctx
- database context
public void databases(LockResult lr)
Proc
databases
in class ACreate
lr
- Container for lock result to pass aroundpublic double prog()
Proc
prog
in class Proc
public boolean stoppable()
Command
stoppable
in class ACreate
public java.lang.String det()
Proc
det
in class Proc
public void build(CmdBuilder cb)
Command
build
in class Command
cb
- command builderpublic static void optimizeAll(Data data, Context ctx, OptimizeAll cmd) throws java.io.IOException
data
- disk datactx
- database contextcmd
- command reference, or null
java.io.IOException
- I/O Exception during index rebuild
BaseXException
- database exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |