Thrill  0.1
BlockQueueSink Class Referencefinal

Detailed Description

BlockSink which interfaces to a File.

Definition at line 175 of file block_queue.hpp.

+ Inheritance diagram for BlockQueueSink:
+ Collaboration diagram for BlockQueueSink:

#include <block_queue.hpp>

Public Member Functions

 BlockQueueSink ()
 
 BlockQueueSink (BlockQueue *queue)
 
 BlockQueueSink (const BlockQueueSink &)=default
 default copy-constructor More...
 
 ~BlockQueueSink ()
 
BlockQueueSinkoperator= (const BlockQueueSink &)=default
 default assignment operator More...
 
Methods of a BlockSink
void AppendBlock (const Block &b, bool is_last_block) final
 
void AppendBlock (Block &&b, bool is_last_block) final
 
void Close () final
 Closes the sink. Must not be called multiple times. More...
 
- Public Member Functions inherited from BlockSink
 BlockSink (BlockPool &block_pool, size_t local_worker_id)
 constructor with reference to BlockPool More...
 
 BlockSink (BlockPool *block_pool, size_t local_worker_id)
 constructor with reference to BlockPool More...
 
 BlockSink (const BlockSink &)=default
 default copy-constructor More...
 
 BlockSink (BlockSink &&)=default
 move-constructor: default More...
 
virtual ~BlockSink ()
 required virtual destructor More...
 
virtual PinnedByteBlockPtr AllocateByteBlock (size_t block_size)
 
virtual void AppendPinnedBlock (PinnedBlock &&b, bool is_last_block)
 Appends the PinnedBlock. More...
 
BlockPoolblock_pool () const
 Returns block_pool_. More...
 
size_t local_worker_id () const
 local worker id to associate pinned block with More...
 
common::JsonLoggerlogger ()
 Returns BlockPool.logger_. More...
 
BlockSinkoperator= (const BlockSink &)=default
 default assignment operator More...
 
BlockSinkoperator= (BlockSink &&)=default
 move-assignment operator: default More...
 
virtual void ReleaseByteBlock (ByteBlockPtr &block)
 Release an unused ByteBlock with n bytes backing memory. More...
 
size_t workers_per_host () const
 return number of workers per host More...
 

Private Attributes

BlockQueuequeue_
 

Static Private Attributes

static constexpr bool debug = false
 

Additional Inherited Members

- Static Public Attributes inherited from BlockSink
static constexpr bool allocate_can_fail_ = false
 
- Protected Attributes inherited from BlockSink
size_t local_worker_id_
 local worker id to associate pinned block with More...
 

Constructor & Destructor Documentation

◆ BlockQueueSink() [1/3]

BlockQueueSink ( )
inline

Definition at line 180 of file block_queue.hpp.

◆ BlockQueueSink() [2/3]

BlockQueueSink ( BlockQueue queue)
inlineexplicit

Definition at line 184 of file block_queue.hpp.

References LOG, and BlockQueue::operator=().

◆ BlockQueueSink() [3/3]

BlockQueueSink ( const BlockQueueSink )
default

default copy-constructor

◆ ~BlockQueueSink()

~BlockQueueSink ( )
inline

Definition at line 195 of file block_queue.hpp.

References LOG, and BlockQueue::queue_.

Member Function Documentation

◆ AppendBlock() [1/2]

void AppendBlock ( const Block b,
bool  is_last_block 
)
inlinefinalvirtual

Append a block to this file, the block must contain given number of items after the offset first.

Implements BlockSink.

Definition at line 204 of file block_queue.hpp.

References BlockQueue::queue_.

◆ AppendBlock() [2/2]

void AppendBlock ( Block &&  b,
bool  is_last_block 
)
inlinefinalvirtual

Append a block to this file, the block must contain given number of items after the offset first.

Implements BlockSink.

Definition at line 211 of file block_queue.hpp.

References BlockQueue::queue_.

◆ Close()

void Close ( )
inlinefinalvirtual

Closes the sink. Must not be called multiple times.

Implements BlockSink.

Definition at line 216 of file block_queue.hpp.

References BlockQueue::queue_.

◆ operator=()

BlockQueueSink& operator= ( const BlockQueueSink )
default

default assignment operator

Member Data Documentation

◆ debug

constexpr bool debug = false
staticprivate

Definition at line 177 of file block_queue.hpp.

◆ queue_

BlockQueue* queue_
private

Definition at line 226 of file block_queue.hpp.


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