This class provides the items which are supplied by the RecordSupply class.
More...
#include <RecordRingItem.h>
This class provides the items which are supplied by the RecordSupply class.
- Date
- 11/05/2019
- Author
- timmer
evio::RecordRingItem::RecordRingItem |
( |
| ) |
|
Default constructor.
Used in RecordSupply by eventFactory to create RecordRingItems for supply.
Copy constructor (sort of).
Used in EventWriter for when disk is full and a copy of the item to be written is made for later writing. Original item is released so ring can function. Note, not everything is copied (sequenceObj) since in usage, the original item has already been released. Also, isAlreadyReleased() is true.
NOT to be used except internally by evio.
- Parameters
-
evio::RecordRingItem::~RecordRingItem |
( |
| ) |
|
|
default |
const std::function< std::shared_ptr< RecordRingItem >) > & evio::RecordRingItem::eventFactory |
( |
| ) |
|
|
static |
bool evio::RecordRingItem::forceToDisk |
( |
| ) |
|
Get whether a file writer forces this record to be physically written to disk.
- Returns
- true if file writer forces this record to be physically written to disk.
void evio::RecordRingItem::forceToDisk |
( |
bool |
force | ) |
|
Set whether a file writer forces this record to be physically written to disk.
- Parameters
-
force | if true, file writer forces this record to be physically written to disk, else false. |
void evio::RecordRingItem::fromConsumer |
( |
int64_t |
seq, |
|
|
std::shared_ptr< Disruptor::ISequence > & |
seqObj |
|
) |
| |
void evio::RecordRingItem::fromProducer |
( |
int64_t |
seq | ) |
|
Set the sequence of an item obtained through RecordSupply#get().
- Parameters
-
seq | sequence used to get item. |
uint64_t evio::RecordRingItem::getId |
( |
| ) |
const |
Get item's id.
Id is 0 if unused.
- Returns
- id number.
ByteOrder & evio::RecordRingItem::getOrder |
( |
| ) |
|
Get the byte order used to build record.
- Returns
- byte order used to build record.
std::shared_ptr< RecordOutput > & evio::RecordRingItem::getRecord |
( |
| ) |
|
Get the contained record.
Record is reset.
- Returns
- contained record.
int64_t evio::RecordRingItem::getSequence |
( |
| ) |
const |
Get the sequence at which this object was taken from ring by one of the "get" calls.
- Returns
- sequence at which this object was taken from ring by one of the "get" calls.
std::shared_ptr< Disruptor::ISequence > & evio::RecordRingItem::getSequenceObj |
( |
| ) |
|
Get the Sequence object allowing ring consumer to get/release this item.
- Returns
- Sequence object allowing ring consumer to get/release this item.
bool evio::RecordRingItem::isAlreadyReleased |
( |
| ) |
const |
bool evio::RecordRingItem::isCheckDisk |
( |
| ) |
|
Get whether there is not enough free space on the disk partition for the next, complete file to be written, resulting in not creating or writing to file.
- Returns
- true if there is not enough free space on the disk partition for the next, complete file to be written, resulting in not creating or writing to file.
bool evio::RecordRingItem::isLastItem |
( |
| ) |
|
Get whether this is the last item in the supply to be used.
- Returns
- true this is the last item in the supply to be used.
void evio::RecordRingItem::reset |
( |
| ) |
|
Assignment operator.
- Parameters
-
- Returns
- left side object.Method to reset this item each time it is retrieved from the supply.
void evio::RecordRingItem::setAlreadyReleased |
( |
bool |
released | ) |
|
Set whether this item has already been released by the RecordSupply.
- Parameters
-
released | true if this item has already been released by the RecordSupply, else false. |
void evio::RecordRingItem::setCheckDisk |
( |
bool |
check | ) |
|
Set whether there is not enough free space on the disk partition for the next, complete file to be written, resulting in not creating or writing to file.
- Parameters
-
check | if true, there is not enough free space on the disk partition for the next, complete file to be written, resulting in not creating or writing to file. |
Method to set RecordRingItem parameters for objects created by eventFactory.
- Parameters
-
order | byte order. |
maxEventCount | max number of events each record can hold. Value <= O means use default (1M). |
maxBufferSize | max number of uncompressed data bytes each record can hold. Value of < 8MB results in default of 8MB. |
compressionType | type of data compression to do. |
Referenced by evio::RecordSupply::RecordSupply().
void evio::RecordRingItem::setId |
( |
uint64_t |
idVal | ) |
|
Set this item's id number.
- Parameters
-
void evio::RecordRingItem::setLastItem |
( |
bool |
last | ) |
|
Set whether this is the last item in the supply to be used.
Used in WriterMT when closing.
- Parameters
-
last | if true, this is the last item in the supply to be used. |
bool evio::RecordRingItem::splitFileAfterWrite |
( |
| ) |
|
Get whether a file writer splits the file after writing this record.
- Returns
- true if file writer splits the file after writing this record.
void evio::RecordRingItem::splitFileAfterWrite |
( |
bool |
split | ) |
|
Set whether a file writer splits the file after writing this record.
- Parameters
-
split | if true, file writer splits the file after writing this record, else false. |
The documentation for this class was generated from the following files: