public class CompositeBackgroundJob.SubJobMonitor extends Object implements BackgroundJobMonitor
BackgroundJobMonitor.Severity| Constructor and Description |
|---|
SubJobMonitor(BackgroundJobMonitor monitor,
int anteilVomGanzen) |
| Modifier and Type | Method and Description |
|---|---|
void |
announceTotal(int totalItems)
Announce the total amount of work to be done.
|
String |
getScheduledJobId()
Get the identifier assigned to the
BackgroundJob by the
scheduler. |
boolean |
isAborting()
Whether the cancellation of the job was requested.
|
void |
log(BackgroundJobMonitor.Severity severity,
Object message)
write to the (job-specific) log.
|
void |
reportProgressAbsolute(int items)
Report units of work completed since the begining of the job.
|
void |
reportProgressIncrement(int items)
Report units of work completed since the last progress report.
|
public SubJobMonitor(BackgroundJobMonitor monitor, int anteilVomGanzen)
public String getScheduledJobId()
BackgroundJobMonitorBackgroundJob by the
scheduler. getScheduledJobId in interface BackgroundJobMonitorpublic void log(BackgroundJobMonitor.Severity severity, Object message)
BackgroundJobMonitorlog in interface BackgroundJobMonitorpublic void announceTotal(int totalItems)
BackgroundJobMonitorBackgroundJob should call this method at the beginning of its
execution, as soon as it knows what lies ahead. It is ok to call this
method multiple times with different values to update an initial
assessment as new/more detailed information about the work to be done
becomes available.announceTotal in interface BackgroundJobMonitortotalItems - the total units of work to be done.public void reportProgressIncrement(int items)
BackgroundJobMonitorBackgroundJob can use this method to report relative increments.reportProgressIncrement in interface BackgroundJobMonitoritems - number of units of work completed since the last call.public void reportProgressAbsolute(int items)
BackgroundJobMonitorBackgroundJob can use this method to report the absolute amount of work
that was tackled since the execution started.reportProgressAbsolute in interface BackgroundJobMonitoritems - number of units of work completed since execution started.public boolean isAborting()
BackgroundJobMonitorBackgroundJobs should poll
this method in regular intervals and exit as quickly as possible if true
is returned.isAborting in interface BackgroundJobMonitorCopyright © 2018. All Rights Reserved.