DataStorm
0.1
Data Distribution Service
|
A sample provides information about a data element update. More...
#include <DataStorm/DataStorm.h>
Public Types | |
using | KeyType = Key |
The type of the sample key. More... | |
using | ValueType = Value |
The type of the sample value. More... | |
using | UpdateTagType = UpdateTag |
The type of the update tag. More... | |
Public Member Functions | |
SampleEvent | getEvent () const noexcept |
The event associated with the sample. More... | |
const Key & | getKey () const noexcept |
The key of the sample. More... | |
const Value & | getValue () const noexcept |
The value of the sample. More... | |
UpdateTag | getUpdateTag () const noexcept |
The update tag for the partial update. More... | |
std::chrono::time_point< std::chrono::system_clock > | getTimeStamp () const noexcept |
The timestamp of the sample. More... | |
std::string | getOrigin () const noexcept |
The origin of the sample. More... | |
std::string | getSession () const noexcept |
Get the session identifier of the session that received this sample. More... | |
A sample provides information about a data element update.
The Sample template provides access to the key, value as well as additional information such as the event, timestamp, update tag. Samples are generated and published by writers and received by readers.
using DataStorm::Sample< Key, Value, UpdateTag >::KeyType = Key |
The type of the sample key.
using DataStorm::Sample< Key, Value, UpdateTag >::UpdateTagType = UpdateTag |
The type of the update tag.
The update tag type defaults to string if it's not explicitly specified with the Sample template paremeters.
using DataStorm::Sample< Key, Value, UpdateTag >::ValueType = Value |
The type of the sample value.
|
noexcept |
The event associated with the sample.
|
noexcept |
The key of the sample.
|
noexcept |
The origin of the sample.
The origin of the sample identifies uniquely on the node the writer that created the sample. It's the name of the writer if a name was explicitly provided on creation of the writer. Otherwise, if no name was provided, an unique identifier is generated by DataStorm.
|
noexcept |
Get the session identifier of the session that received this sample.
This session identifier can be used to retrieve the Ice connection with the node.
|
noexcept |
The timestamp of the sample.
The timestamp is generated by the writer and corresponds to the time of sending.
|
noexcept |
The update tag for the partial update.
This method should only be called if the sample event is PartialUpdate.
|
noexcept |
The value of the sample.
Depending on the sample event, the sample value might not always be available. It's the case if the sample event is Remove where this method will return a default value.