|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Proc
public abstract class Proc
This class is implemented by all kinds of processes.
It gives feedback on the current process. Moreover, it allows to
interrupt the process by calling the stop()
method.
Field Summary | |
---|---|
InfoListener |
listen
Listener, reacting on process information. |
boolean |
updating
This flag indicates that a command may perform updates. |
Constructor Summary | |
---|---|
Proc()
|
Method Summary | ||
---|---|---|
protected void |
abort()
Aborts a failed or interrupted process. |
|
void |
checkStop()
Checks if the process was interrupted; if yes, sends a runtime exception. |
|
void |
databases(LockResult lockResult)
Adds the names of the databases that may be touched by the process. |
|
protected java.lang.String |
det()
Returns short information on this process. |
|
java.lang.String |
detail()
Returns detailed information on the current process or sub process. |
|
void |
listen(InfoListener il)
Attaches the specified info listener. |
|
protected
|
proc(P proc)
Sets a new sub process. |
|
protected double |
prog()
Returns a progress value (0 - 1). |
|
double |
progress()
Returns a progress value from the interval [0, 1] . |
|
boolean |
registered()
Checks if the process is registered. |
|
void |
registered(boolean reg)
Sets the registered state. |
|
void |
startTimeout(long ms)
Starts a timeout thread. |
|
void |
stop()
Stops a process or sub process. |
|
void |
stopTimeout()
Stops the timeout thread. |
|
protected java.lang.String |
tit()
Returns short information on this process. |
|
java.lang.String |
title()
Returns short information on the current process or sub process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public InfoListener listen
public boolean updating
Constructor Detail |
---|
public Proc()
Method Detail |
---|
public final java.lang.String title()
public final java.lang.String detail()
public final double progress()
[0, 1]
.
public final void listen(InfoListener il)
il
- info listenerprotected final <P extends Proc> P proc(P proc)
P
- process typeproc
- process
public final void stop()
public final void checkStop()
protected void abort()
public final void startTimeout(long ms)
ms
- milliseconds to wait; deactivated if set to 0public final void stopTimeout()
public void databases(LockResult lockResult)
lockResult
- Container for lock result to pass aroundpublic final boolean registered()
public final void registered(boolean reg)
reg
- registered flagprotected java.lang.String tit()
protected java.lang.String det()
protected double prog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |