Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Public Attributes | List of all members
Akumuli::StorageEngine::DataBlockWriter Struct Reference

Public Types

enum  { CHUNK_SIZE = 16, CHUNK_MASK = 15, HEADER_SIZE = 14 }
 

Public Member Functions

 DataBlockWriter ()
 Empty c-tor. Constructs unwritable object.
 
 DataBlockWriter (aku_ParamId id, uint8_t *buf, int size)
 
aku_Status put (aku_Timestamp ts, double value)
 
size_t commit ()
 

Public Attributes

Base128StreamWriter stream_
 
DeltaRLEWriter ts_stream_
 
FcmStreamWriter val_stream_
 
int write_index_
 
aku_Timestamp ts_writebuf_ [CHUNK_SIZE]
 
double val_writebuf_ [CHUNK_SIZE]
 Write buffer for timestamps.
 
uint16_t * nchunks_
 Write buffer for values.
 
uint16_t * ntail_
 

Constructor & Destructor Documentation

Akumuli::StorageEngine::DataBlockWriter::DataBlockWriter ( aku_ParamId  id,
uint8_t *  buf,
int  size 
)

C-tor

Parameters
idSeries id.
sizeBlock size.
bufPointer to buffer.

Member Function Documentation

aku_Status Akumuli::StorageEngine::DataBlockWriter::put ( aku_Timestamp  ts,
double  value 
)

Append value to block.

Parameters
tsTimestamp.
valueValue.
Returns
AKU_EOVERFLOW when block is full or AKU_SUCCESS.

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