|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.Job.ProgressReporterImpl
static class Job.ProgressReporterImpl
Implements the ProgressReporter interface and stores the percentage completed for the current job.
Field Summary | |
---|---|
private JobAgent |
agent
|
private ProgressReporter |
chained
|
private Job |
job
|
private int |
jobId
|
private long |
lastUpdate
|
private int |
lastValue
|
private int |
offset
|
private SessionControl |
sc
|
private String |
server
|
private static long |
UPDATE_INTERVAL
Number of miliseconds between updates to the database. |
private static int |
UPDATE_PERCENT
Min percentage difference between updates to the database. |
Constructor Summary | |
---|---|
Job.ProgressReporterImpl(Job job,
String server,
JobAgent agent,
ProgressReporter chained)
|
Method Summary | |
---|---|
void |
append(String message)
Append a message to the previous one. |
private void |
appendProgress(org.hibernate.Session session,
String statusMessage)
|
void |
display(int percent,
String message)
Display a progress message. |
(package private) void |
setConfigured(PluginResponse response)
|
(package private) void |
setEnded(PluginResponse response,
boolean isShuttingDown)
|
(package private) void |
setStarted(Class<? extends SignalTransporter> signalTransporter,
String signalId)
|
private void |
updateProgress(org.hibernate.Session session,
int percent,
String statusMessage)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long UPDATE_INTERVAL
private static final int UPDATE_PERCENT
private final SessionControl sc
private final int jobId
private final String server
private final Job job
private final JobAgent agent
private final ProgressReporter chained
private long lastUpdate
private int lastValue
private int offset
Constructor Detail |
---|
Job.ProgressReporterImpl(Job job, String server, JobAgent agent, ProgressReporter chained) throws BaseException
BaseException
Method Detail |
---|
public void display(int percent, String message)
ProgressReporter
display
in interface ProgressReporter
percent
- How many percent of the task that is completed
or -1 if not knownmessage
- A message, or nullpublic void append(String message)
ProgressReporter
append
in interface ProgressReporter
message
- The messageprivate void updateProgress(org.hibernate.Session session, int percent, String statusMessage)
private void appendProgress(org.hibernate.Session session, String statusMessage)
void setConfigured(PluginResponse response)
void setStarted(Class<? extends SignalTransporter> signalTransporter, String signalId)
void setEnded(PluginResponse response, boolean isShuttingDown)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |