Interface ImportNotificationMonitor


public interface ImportNotificationMonitor
This callback interface can be passed to a DataStoreConnection to receive errors and warnings during import. Importation can take place on multiple worker threads simultaneously, so implementations should be prepared to handle asynchronous invocations. Moreover, it is possible that multiple sources will be imported simultaneously, so each source is distinguished by an integer job ID.
  • Field Details

  • Method Details

    • importProcessStarted

      void importProcessStarted()
      Called at the beginning of importation to allow the monitor to prepare any data structures it might need.
    • importJobStarted

      void importJobStarted​(int jobID, java.lang.String inputSourceName)
      Called when the importation of a data source starts.
      Parameters:
      jobID - an identifier identifying an import job
      inputSourceName - the name of the input source that will be imported
    • importNotification

      ImportNotificationMonitor.NotificationAction importNotification​(int jobID, ImportNotificationMonitor.NotificationType notificationType, long line, long column, java.lang.String description, long totalNotificationsThusFar)
      Called when an error or a warning is encountered.
      Parameters:
      jobID - an identifier identifying an import job
      notificationType - determines the type of notification (i.e., an error or a warning)
      line - the line number in the input source where the error/warning was produced
      column - the column number in the input source where the error/warning was produced
      description - text describing the error/warning
      totalNotificationsThusFar - the total number of errors/notifications encountered thus far across all input sources
      Returns:
      determines how the import should proceed after this notification
    • importJobFinished

      void importJobFinished​(int jobID)
      Called when the importation of a data source finishes.
      Parameters:
      jobID - an identifier identifying an import job
    • importProcessFinished

      void importProcessFinished​(ImportResult importResult, Prefixes prefixes)
      Called at the end of importation to notify the monitor about the results.
      Parameters:
      importResult - contains information about the import
      prefixes - contains the prefixes encountered during the process