forked from Abc-Arbitrage/Disruptor-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIEventProcessorFactory.h
More file actions
32 lines (25 loc) · 979 Bytes
/
IEventProcessorFactory.h
File metadata and controls
32 lines (25 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <memory>
#include "Disruptor/IEventProcessor.h"
#include "Disruptor/RingBuffer.h"
namespace Disruptor
{
/**
* A factory interface to make it possible to include custom event processors in a chain
*/
template <class T>
class IEventProcessorFactory
{
public:
virtual ~IEventProcessorFactory() = default;
/**
* Create a new event processor that gates on barrierSequences
*
* \param ringBuffer ring buffer
* \param barrierSequences barrierSequences the sequences to gate on
* \returns a new EventProcessor that gates on before processing events
*/
virtual std::shared_ptr< IEventProcessor > createEventProcessor(const std::shared_ptr< RingBuffer< T > >& ringBuffer,
const std::vector< std::shared_ptr< ISequence > >& barrierSequences) = 0;
};
} // namespace Disruptor