Package net.sf.basedb.core
Class Job.ProgressReporterImpl
java.lang.Object
net.sf.basedb.core.Job.ProgressReporterImpl
- All Implemented Interfaces:
ProgressReporter
- Enclosing class:
- Job
Implements the ProgressReporter interface and
stores the percentage completed for the current job.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final JobAgent
private final ProgressReporter
private final Job
private final int
private long
private int
private final String
private int
private final SessionControl
private final String
private static final long
Number of miliseconds between updates to the database.private static final int
Min percentage difference between updates to the database. -
Constructor Summary
ConstructorDescriptionProgressReporterImpl
(Job job, String server, String node, JobAgent agent, ProgressReporter chained) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append a message to the previous one.private void
appendProgress
(Session session, String statusMessage) void
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
(Session session, int percent, String statusMessage)
-
Field Details
-
UPDATE_INTERVAL
private static final long UPDATE_INTERVALNumber of miliseconds between updates to the database.- See Also:
-
UPDATE_PERCENT
private static final int UPDATE_PERCENTMin percentage difference between updates to the database.- See Also:
-
sc
-
jobId
private final int jobId -
server
-
node
-
job
-
agent
-
chained
-
lastUpdate
private long lastUpdate -
lastValue
private int lastValue -
offset
private int offset
-
-
Constructor Details
-
ProgressReporterImpl
ProgressReporterImpl(Job job, String server, String node, JobAgent agent, ProgressReporter chained) throws BaseException - Throws:
BaseException
-
-
Method Details
-
display
Description copied from interface:ProgressReporter
Display a progress message.- Specified by:
display
in interfaceProgressReporter
- Parameters:
percent
- How many percent of the task that is completed or -1 if not knownmessage
- A message, or null
-
append
Description copied from interface:ProgressReporter
Append a message to the previous one.- Specified by:
append
in interfaceProgressReporter
- Parameters:
message
- The message
-
updateProgress
-
appendProgress
-
setConfigured
-
setStarted
-
setEnded
-