RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Public Attributes
Datacratic::TypedMessageSink< Message > Struct Template Reference
Inheritance diagram for Datacratic::TypedMessageSink< Message >:
Datacratic::AsyncEventSource

List of all members.

Public Member Functions

 TypedMessageSink (size_t bufferSize)
void push (const Message &message)
void push (Message &&message)
bool tryPush (Message &&message)
virtual int selectFd () const
virtual bool poll () const
virtual bool processOne ()

Public Attributes

std::function< void(Message
&&message)> 
onEvent

Detailed Description

template<typename Message>
struct Datacratic::TypedMessageSink< Message >

Definition at line 24 of file typed_message_channel.h.


Member Function Documentation

template<typename Message>
virtual bool Datacratic::TypedMessageSink< Message >::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 from Datacratic::AsyncEventSource.

Definition at line 62 of file typed_message_channel.h.

template<typename Message>
virtual bool Datacratic::TypedMessageSink< Message >::processOne ( ) [inline, 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.

Implements Datacratic::AsyncEventSource.

Definition at line 67 of file typed_message_channel.h.

template<typename Message>
virtual int Datacratic::TypedMessageSink< Message >::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 from Datacratic::AsyncEventSource.

Definition at line 57 of file typed_message_channel.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator