Interface WorkHandler<T>

  • Type Parameters:
    T - event implementation storing the data for sharing during exchange or parallel coordination of an event.

    public interface WorkHandler<T>
    Callback interface to be implemented for processing units of work as they become available in the RingBuffer.
    See Also:
    WorkerPool
    • Method Detail

      • onEvent

        void onEvent​(T event)
              throws java.lang.Exception
        Callback to indicate a unit of work needs to be processed.
        Parameters:
        event - published to the RingBuffer
        Throws:
        java.lang.Exception - if the WorkHandler would like the exception handled further up the chain.