#pragma once #include namespace Disruptor { /** * Callback interface to be implemented for processing events as they become available in the RingBuffer * * \tparam T Type of events for sharing during exchange or parallel coordination of an event * \remark See BatchEventProcessor.SetExceptionHandler if you want to handle exceptions propagated out of the handler. */ template class IEventHandler { public: virtual ~IEventHandler() = default; /** * Called when a publisher has committed an event to the RingBuffer * * \param data Data committed to the RingBuffer * \param sequence Sequence number committed to the RingBuffer * \param endOfBatch flag to indicate if this is the last event in a batch from the RingBuffer */ virtual void onEvent(T& data, std::int64_t sequence, bool endOfBatch) = 0; }; } // namespace Disruptor