public class FlowLogger extends PhaseMonitor
PhaseMonitor to save log for each jobflow.PhaseMonitor.JobStatusNULL| Constructor and Description |
|---|
FlowLogger(ExecutionContext context,
FlowLoggerProfile profile)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Ends the current task and notify this event to the corresponding receiver.
|
protected void |
onJobMonitorClosed(String jobId)
Notifies the job was closed.
|
protected void |
onJobMonitorOpened(String jobId)
Notifies the job was opened.
|
void |
open(double taskSize)
Begins a task and notify this event to the corresponding receiver.
|
void |
progressed(double deltaSize)
Progresses the current task and notify this event to the corresponding receiver.
|
void |
reportJobStatus(String jobId,
PhaseMonitor.JobStatus status,
Throwable cause)
Reports job status about target job ID.
|
void |
setProgress(double workedSize)
Sets the progress of current task and notify this event to the corresponding receiver.
|
checkCancelled, createJobMonitor, getJobOutput, getOutput, isCancelRequestedpublic FlowLogger(ExecutionContext context, FlowLoggerProfile profile)
context - current contextprofile - the profile for this loggerIllegalArgumentException - if some parameters were nullpublic void open(double taskSize)
throws IOException
ExecutionMonitortaskSize - the total task sizeIOException - if failed to notify this eventpublic void progressed(double deltaSize)
ExecutionMonitordeltaSize - the difference of progressed task sizepublic void setProgress(double workedSize)
ExecutionMonitorworkedSize - the absolute progressed task sizeprotected void onJobMonitorOpened(String jobId)
PhaseMonitoronJobMonitorOpened in class PhaseMonitorjobId - target job IDprotected void onJobMonitorClosed(String jobId)
PhaseMonitoronJobMonitorClosed in class PhaseMonitorjobId - target job IDpublic void reportJobStatus(String jobId, PhaseMonitor.JobStatus status, Throwable cause) throws IOException
PhaseMonitorreportJobStatus in class PhaseMonitorjobId - target job IDstatus - the job statuscause - occurred exception (nullable)IOException - if failed to notify this eventpublic void close()
throws IOException
ExecutionMonitorIOException - if failed to notify this eventCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.