![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
Public Member Functions | |
| virtual int | selectFd () const |
| virtual bool | poll () const |
| virtual bool | processOne ()=0 |
| virtual bool | singleThreaded () const |
| virtual void | debug (bool debugOn) |
| virtual void | connected (MessageLoop *parent) |
| void | disconnect () |
Public Attributes | |
| bool | needsPoll |
| bool | debug_ |
| MessageLoop * | parent_ |
Definition at line 25 of file async_event_source.h.
| virtual void Datacratic::AsyncEventSource::connected | ( | MessageLoop * | parent | ) | [inline, virtual] |
Notify that the given message loop is responsible.
Definition at line 81 of file async_event_source.h.
| virtual void Datacratic::AsyncEventSource::debug | ( | bool | debugOn | ) | [inline, virtual] |
Sets whether or not it is in debug mode.
Reimplemented in Datacratic::MessageLoop.
Definition at line 75 of file async_event_source.h.
Disconnect from the parent message loop.
Reimplemented in Datacratic::ZmqNamedProxy, and Datacratic::ZmqNamedSocket.
Definition at line 22 of file async_event_source.cc.
| virtual bool Datacratic::AsyncEventSource::poll | ( | ) | const [inline, virtual] |
Returns true if there is work to be done. May be called from more than one thread. Should never block.
Reimplemented in Datacratic::ZmqBinaryTypedEventSource< Arg >, Datacratic::ZmqBinaryTypedEventSource< zmq_event_t >, Datacratic::ZmqBinaryEventSource, Datacratic::MessageLoop, Datacratic::ZmqEventSource, Datacratic::Epoller, Datacratic::FullPoller, Datacratic::TypedMessageSink< Message >, Datacratic::TypedMessageSink< RouterMessage >, Datacratic::TypedMessageSink< std::string >, Datacratic::TypedMessageSink< std::vector< std::string > >, Datacratic::TypedMessageSink< int >, Datacratic::TypedMessageSink< SubmittedAuctionEvent >, Datacratic::TypedMessageSink< std::vector< zmq::message_t > >, Datacratic::TypedMessageSink< Response >, Datacratic::TypedMessageSink< AccountKey >, Datacratic::TypedMessageSink< std::shared_ptr< Entry > >, Datacratic::TypedMessageSink< Operation >, and Datacratic::TypedMessageSink< std::shared_ptr< PostAuctionEvent > >.
Definition at line 53 of file async_event_source.h.
| virtual bool Datacratic::AsyncEventSource::processOne | ( | ) | [pure virtual] |
Process a single message and return true if there are more to be processed.
This may be called from more than one thread if singleThreaded() is false.
Implemented in Datacratic::ZmqBinaryTypedEventSource< Arg >, Datacratic::ZmqBinaryTypedEventSource< zmq_event_t >, Datacratic::ZmqBinaryEventSource, Datacratic::PeriodicEventSource, Datacratic::MessageLoop, Datacratic::ZmqEventSource, Datacratic::Epoller, Datacratic::FullPoller, Datacratic::TypedMessageSink< Message >, Datacratic::TypedMessageSink< RouterMessage >, Datacratic::TypedMessageSink< std::string >, Datacratic::TypedMessageSink< std::vector< std::string > >, Datacratic::TypedMessageSink< int >, Datacratic::TypedMessageSink< SubmittedAuctionEvent >, Datacratic::TypedMessageSink< std::vector< zmq::message_t > >, Datacratic::TypedMessageSink< Response >, Datacratic::TypedMessageSink< AccountKey >, Datacratic::TypedMessageSink< std::shared_ptr< Entry > >, Datacratic::TypedMessageSink< Operation >, and Datacratic::TypedMessageSink< std::shared_ptr< PostAuctionEvent > >.
| virtual int Datacratic::AsyncEventSource::selectFd | ( | ) | const [inline, virtual] |
Return the file descriptor on which one should select() for messages from this source. The source should organize itself such that if the fd indicates ready for a read, there is something to do.
Should return -1 if it requires polling.
Should never block.
Reimplemented in Datacratic::ZmqBinaryTypedEventSource< Arg >, Datacratic::ZmqBinaryTypedEventSource< zmq_event_t >, Datacratic::ZmqBinaryEventSource, Datacratic::PeriodicEventSource, Datacratic::FullPoller, Datacratic::ZmqEventSource, Datacratic::Epoller, Datacratic::TypedMessageSink< Message >, Datacratic::TypedMessageSink< RouterMessage >, Datacratic::TypedMessageSink< std::string >, Datacratic::TypedMessageSink< std::vector< std::string > >, Datacratic::TypedMessageSink< int >, Datacratic::TypedMessageSink< SubmittedAuctionEvent >, Datacratic::TypedMessageSink< std::vector< zmq::message_t > >, Datacratic::TypedMessageSink< Response >, Datacratic::TypedMessageSink< AccountKey >, Datacratic::TypedMessageSink< std::shared_ptr< Entry > >, Datacratic::TypedMessageSink< Operation >, and Datacratic::TypedMessageSink< std::shared_ptr< PostAuctionEvent > >.
Definition at line 45 of file async_event_source.h.
| virtual bool Datacratic::AsyncEventSource::singleThreaded | ( | ) | const [inline, virtual] |
Return whether the callbacks need to be called from a single thread or not.
Reimplemented in Datacratic::PeriodicEventSource.
Definition at line 69 of file async_event_source.h.
Sets whether this event handler is being debugged.
Definition at line 98 of file async_event_source.h.
Sets whether or not this source requires polling periodically (as the selectFd may not include all events).
Definition at line 95 of file async_event_source.h.
The parent message loop.
Definition at line 101 of file async_event_source.h.
1.7.6.1