Thrill  0.1
FileBlockSink Class Referencefinal

Detailed Description

BlockSink which interfaces to a File.

Definition at line 290 of file file.hpp.

+ Inheritance diagram for FileBlockSink:
+ Collaboration diagram for FileBlockSink:

#include <file.hpp>

Public Member Functions

 FileBlockSink ()
 
 FileBlockSink (tlx::CountingPtrNoDelete< File > file)
 
 FileBlockSink (const FileBlockSink &)=default
 default copy-constructor More...
 
 ~FileBlockSink ()
 
FileBlockSinkoperator= (const FileBlockSink &)=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

tlx::CountingPtrNoDelete< Filefile_
 

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

◆ FileBlockSink() [1/3]

FileBlockSink ( )
inline

Definition at line 295 of file file.hpp.

◆ FileBlockSink() [2/3]

FileBlockSink ( tlx::CountingPtrNoDelete< File file)
inlineexplicit

Definition at line 299 of file file.hpp.

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

◆ FileBlockSink() [3/3]

FileBlockSink ( const FileBlockSink )
default

default copy-constructor

◆ ~FileBlockSink()

~FileBlockSink ( )
inline

Definition at line 310 of file file.hpp.

References LOG.

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 319 of file file.hpp.

◆ 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 326 of file file.hpp.

◆ Close()

void Close ( )
inlinefinalvirtual

Closes the sink. Must not be called multiple times.

Implements BlockSink.

Definition at line 331 of file file.hpp.

◆ operator=()

FileBlockSink& operator= ( const FileBlockSink )
default

default assignment operator

Member Data Documentation

◆ debug

constexpr bool debug = false
staticprivate

Definition at line 292 of file file.hpp.

◆ file_

Definition at line 341 of file file.hpp.


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