Class AbstractJobCallback<R extends DataReader,W extends DataWriter>
java.lang.Object
com.northconcepts.datapipeline.job.AbstractJobCallback<R,W>
- All Implemented Interfaces:
JobCallback<R,W>
- Direct Known Subclasses:
DefaultJobCallback
public abstract class AbstractJobCallback<R extends DataReader,W extends DataWriter>
extends Object
implements JobCallback<R,W>
A default, abstract implementation of JobCallback.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.northconcepts.datapipeline.job.JobCallback
JobCallback.Helper -
Field Summary
Fields inherited from interface com.northconcepts.datapipeline.job.JobCallback
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after a failed or cancelled transfer closes the reader and writer, with the record in progress ornull; the default rethrows the exception, makingJob.run()throw it.voidonProgress(R reader, W writer, Record currentRecord) Called on the job's thread after each record is written.voidCalled after all records were transferred and the reader and writer closed.
-
Constructor Details
-
AbstractJobCallback
public AbstractJobCallback()
-
-
Method Details
-
onProgress
Description copied from interface:JobCallbackCalled on the job's thread after each record is written.- Specified by:
onProgressin interfaceJobCallback<R extends DataReader,W extends DataWriter> - Throws:
Throwable
-
onSuccess
Description copied from interface:JobCallbackCalled after all records were transferred and the reader and writer closed.- Specified by:
onSuccessin interfaceJobCallback<R extends DataReader,W extends DataWriter> - Throws:
Throwable
-
onFailure
public void onFailure(R reader, W writer, Record currentRecord, Throwable exception) throws Throwable Description copied from interface:JobCallbackCalled after a failed or cancelled transfer closes the reader and writer, with the record in progress ornull; the default rethrows the exception, makingJob.run()throw it.- Specified by:
onFailurein interfaceJobCallback<R extends DataReader,W extends DataWriter> - Throws:
Throwable
-