CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TaskRead Class Reference

#include <task_read.h>

Inheritance diagram for TaskRead:
Collaboration diagram for TaskRead:

Public Member Functions

 TaskRead (Tube< FileItem > *tube_in, TubeGroup< BlockItem > *tubes_out, ItemAllocator *allocator)
 
void SetWatermarks (uint64_t low, uint64_t high)
 
uint64_t n_block ()
 
- Public Member Functions inherited from TubeConsumer< FileItem >
virtual ~TubeConsumer ()
 

Static Public Attributes

static const unsigned kThrottleInitMs = 50
 
static const unsigned kThrottleMaxMs = 500
 
static const unsigned kThrottleResetMs = 2000
 
static const unsigned kBlockSize = kPageSize * 4
 

Protected Member Functions

virtual void Process (FileItem *item)
 
- Protected Member Functions inherited from TubeConsumer< FileItem >
 TubeConsumer (Tube< FileItem > *tube)
 
virtual void OnTerminate ()
 

Private Attributes

TubeGroup< BlockItem > * tubes_out_
 
ItemAllocatorallocator_
 
uint64_t low_watermark_
 
uint64_t high_watermark_
 
atomic_int64 n_block_
 

Static Private Attributes

static atomic_int64 tag_seq_ = 0
 

Additional Inherited Members

- Protected Attributes inherited from TubeConsumer< FileItem >
Tube< FileItem > * tube_
 

Detailed Description

Definition at line 18 of file task_read.h.

Constructor & Destructor Documentation

TaskRead::TaskRead ( Tube< FileItem > *  tube_in,
TubeGroup< BlockItem > *  tubes_out,
ItemAllocator allocator 
)
inline

Definition at line 25 of file task_read.h.

Member Function Documentation

uint64_t TaskRead::n_block ( )
inline

Definition at line 38 of file task_read.h.

void TaskRead::Process ( FileItem item)
protectedvirtual

Implements TubeConsumer< FileItem >.

Definition at line 24 of file task_read.cc.

Here is the call graph for this function:

void TaskRead::SetWatermarks ( uint64_t  low,
uint64_t  high 
)

Definition at line 80 of file task_read.cc.

Referenced by IngestionPipeline::IngestionPipeline(), and ScrubbingPipeline::ScrubbingPipeline().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

ItemAllocator* TaskRead::allocator_
private

Definition at line 51 of file task_read.h.

Referenced by Process().

uint64_t TaskRead::high_watermark_
private

Stop reading new data into the pipeline when the amount BlockItem managed byte is higher than the given level.

Definition at line 61 of file task_read.h.

Referenced by Process(), and SetWatermarks().

const unsigned TaskRead::kBlockSize = kPageSize * 4
static

Definition at line 23 of file task_read.h.

Referenced by Process().

const unsigned TaskRead::kThrottleInitMs = 50
static

Definition at line 20 of file task_read.h.

Referenced by Process().

const unsigned TaskRead::kThrottleMaxMs = 500
static

Definition at line 21 of file task_read.h.

Referenced by Process().

const unsigned TaskRead::kThrottleResetMs = 2000
static

Definition at line 22 of file task_read.h.

Referenced by Process().

uint64_t TaskRead::low_watermark_
private

Continue reading once the amount of BlockItem managed bytes is back to the given level.

Definition at line 56 of file task_read.h.

Referenced by Process(), and SetWatermarks().

atomic_int64 TaskRead::n_block_
private

Number of times reading was blocked on a high watermark.

Definition at line 65 of file task_read.h.

Referenced by n_block(), Process(), and TaskRead().

atomic_int64 TaskRead::tag_seq_ = 0
staticprivate

Every new file increases the tag sequence counter that is used to annotate BlockItems.

This file is part of the CernVM File System.

Definition at line 48 of file task_read.h.

Referenced by Process().

TubeGroup<BlockItem>* TaskRead::tubes_out_
private

Definition at line 50 of file task_read.h.

Referenced by Process().


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