forked from Abc-Arbitrage/Disruptor-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIEventProcessor.h
More file actions
38 lines (28 loc) · 839 Bytes
/
IEventProcessor.h
File metadata and controls
38 lines (28 loc) · 839 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
33
34
35
36
37
38
#pragma once
#include <memory>
namespace Disruptor
{
class ISequence;
class IEventProcessor
{
public:
virtual ~IEventProcessor() = default;
/**
* Return a reference to the ISequence being used by this IEventProcessor
*/
virtual std::shared_ptr< ISequence > sequence() const = 0;
/**
* Signal that this IEventProcessor should stop when it has finished consuming at the next clean break.
* It will call ISequenceBarrier.alert() to notify the thread to check status.
*/
virtual void halt() = 0;
/**
* Starts this instance
*/
virtual void run() = 0;
/**
* Gets if the processor is running
*/
virtual bool isRunning() const = 0;
};
} // namespace Disruptor