Ensō 0.4.6
Software API reference
Loading...
Searching...
No Matches
enso::QueueProducer< T > Class Template Reference
Inheritance diagram for enso::QueueProducer< T >:
enso::Queue< T, QueueProducer< T > >

Public Member Functions

int Push (const T &data)
 Pushes data to the queue.
 
- Public Member Functions inherited from enso::Queue< T, QueueProducer< T > >
 Queue (Queue &&other)=default
 
Queueoperator= (Queue &&other)=default
 
Element * buf_addr () const noexcept
 Returns the address of the internal buffer.
 
size_t size () const noexcept
 Returns the size of the internal buffer.
 
uint32_t capacity () const noexcept
 Returns the capacity of the queue.
 

Protected Member Functions

 QueueProducer (const std::string &queue_name, size_t size, const std::string &huge_page_prefix) noexcept
 
int Init (bool join_if_exists) noexcept
 Initializes the Queue object.
 
- Protected Member Functions inherited from enso::Queue< T, QueueProducer< T > >
 Queue (const std::string &queue_name, size_t size, const std::string &huge_page_prefix) noexcept
 
int Init (bool join_if_exists) noexcept
 Initializes the Queue object.
 
bool created_queue () const noexcept
 
uint32_t index_mask () const noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from enso::Queue< T, QueueProducer< T > >
static std::unique_ptr< QueueProducer< T > > Create (const std::string &queue_name, size_t size=0, bool join_if_exists=true, std::string huge_page_prefix="") noexcept
 Factory method to create a Queue object.
 
- Static Public Attributes inherited from enso::Queue< T, QueueProducer< T > >
static constexpr size_t kElementMetaSize
 
static constexpr size_t kElementPadding
 

Detailed Description

template<typename T>
class enso::QueueProducer< T >

Definition at line 298 of file queue.h.

Constructor & Destructor Documentation

◆ QueueProducer()

template<typename T >
enso::QueueProducer< T >::QueueProducer ( const std::string &  queue_name,
size_t  size,
const std::string &  huge_page_prefix 
)
inlineexplicitprotectednoexcept

Definition at line 326 of file queue.h.

Member Function Documentation

◆ Init()

template<typename T >
int enso::QueueProducer< T >::Init ( bool  join_if_exists)
inlineprotectednoexcept

Initializes the Queue object.

Parameters
join_if_existsIf true, the queue will be joined if it already exists. If false, the creation will fail if the queue already exists.
Returns
0 on success and a non-zero error code on failure.

Definition at line 338 of file queue.h.

◆ Push()

template<typename T >
int enso::QueueProducer< T >::Push ( const T &  data)
inline

Pushes data to the queue.

Parameters
datadata to push.
Returns
0 on success and a non-zero error code on failure.

Definition at line 306 of file queue.h.


The documentation for this class was generated from the following file: