53 return 0 != value_.bits_.eventsDispatched_;
59 value_.bits_.eventsDispatched_ = state ? 1 : 0;
65 return 0 != value_.bits_.ioWaited_;
71 value_.bits_.ioWaited_ = state ? 1 : 0;
77 return value_.bits_.reserved_;
83 value_.bits_.reserved_ = flags;
89 Flags eventsDispatched_ : 1;
203 , spinBeforeIdleTime_(1)
217 return threadAffinity_;
229 return threadAffinity_;
243 threadCount_ = value;
256 return spinBeforeIdleTime_;
262 spinBeforeIdleTime_ = value;
267 UInt32 spinBeforeIdleTime_;
320 class FeedEngineThreadPoolImpl;
321 FeedEngineThreadPoolImpl* impl_;
#define ONIXS_EURONEXT_OPTIQMDG_NOTHROW
#define ONIXS_EURONEXT_OPTIQMDG_OVERRIDE
#define ONIXS_EURONEXT_OPTIQMDG_NULLPTR
~EfViFeedEngine() override
EfViFeedEngine(UInt32 receiveRingSize=4095, WatchService &watch=NicWatch::service())
Constructor.
A pool of threads executing feed engine tasks.
const FeedEngineThreadPoolSettings settings() const
FeedEngineThreadPool(const FeedEngineThreadPoolSettings &, FeedEngine *, FeedEngineThreadPoolListener *=nullptr)
The Feed Engine machinery.
std::string info()
Provides information about the actual implementation of the feed engine.
NetFeedEngineProcessResult process()
Carries out pending actions like data retrieval and event dispatching.
Designed to reflect various aspects of feed engine processing flow.
void reserved(Flags flags) noexcept
Reserved (unused) flags.
NetFeedEngineProcessResult(UInt32 flags) noexcept
void ioWaited(bool state) noexcept
Indicates whether processing had to sleep in kernel while checking data availability.
Flags reserved() const noexcept
Reserved (unused) flags.
bool ioWaited() const noexcept
Indicates whether processing had to sleep in kernel while checking data availability.
bool eventsDispatched() const noexcept
Indicates whether feed-related events like data reception or absence have been dispatched.
void eventsDispatched(bool state) noexcept
Indicates whether feed-related events like data reception or absence have been dispatched.
UInt32 Flags
Aliases integral type whose bits are used to indicate flag presence.
static NicWatch & service()
Returns watch service.
~SocketFeedEngine() override
SocketFeedEngine(UInt32 dataWaitTime=10, UInt32 socketBufferSize=8 *1024 *1024, WatchService &watch=UtcWatch::service())
Constructor.
Current thread related tasks.
static void affinity(CpuIndex)
static void affinity(const ThreadAffinity &)
Sets the processor affinity mask for the current thread.
Represents set of CPU indices.
static UtcWatch & service()
Returns watch service.
size_t CpuIndex
Zero-based index of CPU.
bool process(FeedEngine &engine)
Carries out pending actions like data retrieval and event dispatching.
Identifies reasons feed engine threads becomes idle.
@ DataWaitTimeout
Thread waited for incoming data using corresponding I/O operations (like 'select') and exited waiting...
@ Redundant
Thread entered idle state due to absence of any data and while other threads are waiting for new inco...
Listener for thread-related events.
virtual void onFeedEngineThreadBegin(const FeedEngineThreadPool &)
Member invoked by feed engine when a new processing thread is spawned.
virtual ~FeedEngineThreadPoolListener()
virtual void onFeedEngineThreadIdle(const FeedEngineThreadPool &, FeedEngineThreadIdle::Reason, UInt32 &)
Is called when feed engine's thread is idle.
virtual void onFeedEngineThreadEnd(const FeedEngineThreadPool &)
Member is invoked by feed engine when processing thread is about to end.
FeedEngineThreadPoolSettings()
void threadCount(UInt32 value)
Sets threadsCount.
UInt32 spinBeforeIdleTime() const
Defines amount of time Feed Engine keeps cycling before going to sleep when no useful activity can be...
ThreadAffinity & threadAffinity()
Defines set of CPUs allowed for each working thread to be executed on while processing market data by...
const ThreadAffinity & threadAffinity() const
Defines set of CPUs allowed for each working thread to be executed on while processing market data by...
void spinBeforeIdleTime(UInt32 value)
Sets redundancySpinTime.
UInt32 threadCount() const
Number of working threads to be used by feed engine.