public abstract class Proc extends Object
stop()
method.Modifier and Type | Field and Description |
---|---|
InfoListener |
listen
Listener, reacting on process information.
|
boolean |
updating
This flag indicates that a command may perform updates.
|
Constructor and Description |
---|
Proc() |
Modifier and Type | Method and Description |
---|---|
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 lr)
Adds the names of the databases that may be touched by the process.
|
protected String |
det()
Returns short information on this process.
|
String |
detail()
Returns detailed information on the current process or sub process.
|
void |
listen(InfoListener il)
Attaches the specified info listener.
|
<P extends Proc> |
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 String |
tit()
Returns short information on this process.
|
String |
title()
Returns short information on the current process or sub process.
|
public InfoListener listen
public boolean updating
public final String title()
public final String detail()
public final double progress()
[0, 1]
.public final void listen(InfoListener il)
il
- info listenerpublic final <P extends Proc> P proc(P proc)
P
- process typeproc
- processpublic 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 lr)
lr
- container for lock result to pass aroundpublic final boolean registered()
public final void registered(boolean reg)
reg
- registered flagprotected String tit()
protected String det()
protected double prog()
Copyright © 2005–2015 BaseX Team. All rights reserved.