Interface JobCallback<R extends DataReader,W extends DataWriter>

All Known Implementing Classes:
AbstractJobCallback, DefaultJobCallback

public interface JobCallback<R extends DataReader,W extends DataWriter>
Receives the progress and outcome of a Job; the default onFailure rethrows the exception.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Factory for default callbacks such as NULL.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onFailure(R reader, W writer, Record currentRecord, Throwable exception)
    Called after a failed or cancelled transfer closes the reader and writer, with the record in progress or null; the default rethrows the exception, making Job.run() throw it.
    default void
    onProgress(R reader, W writer, Record currentRecord)
    Called on the job's thread after each record is written.
    default void
    onSuccess(R reader, W writer)
    Called after all records were transferred and the reader and writer closed.
  • Field Details

  • Method Details

    • onProgress

      default void onProgress(R reader, W writer, Record currentRecord) throws Throwable
      Called on the job's thread after each record is written.
      Throws:
      Throwable
    • onSuccess

      default void onSuccess(R reader, W writer) throws Throwable
      Called after all records were transferred and the reader and writer closed.
      Throws:
      Throwable
    • onFailure

      default void onFailure(R reader, W writer, Record currentRecord, Throwable exception) throws Throwable
      Called after a failed or cancelled transfer closes the reader and writer, with the record in progress or null; the default rethrows the exception, making Job.run() throw it.
      Throws:
      Throwable