Interface BatchProcessor.BatchProcessWorker<T>

    • Method Detail

      • getIdentifier

        java.lang.String getIdentifier​(T entry)
        Gets an identifier for the given entry (for monitoring / logging purposes).
        Parameters:
        entry - the entry
        Returns:
        the identifier
      • beforeProcess

        void beforeProcess()
                    throws java.lang.Throwable
        Callback to allow thread initialization before the work entries are processed. Typically, this will include authenticating as a valid user and disbling or enabling any system flags that might affect the entry processing.
        Throws:
        java.lang.Throwable
      • process

        void process​(T entry)
              throws java.lang.Throwable
        Processes the given entry.
        Parameters:
        entry - the entry
        Throws:
        java.lang.Throwable - on any error
      • afterProcess

        void afterProcess()
                   throws java.lang.Throwable
        Callback to allow thread cleanup after the work entries have been processed. Typically, this will involve cleanup of authentication and resetting any system flags previously set.

        This call is made regardless of the outcome of the entry processing.

        Throws:
        java.lang.Throwable