#include "swcdb/core/comm/HeaderBufferInfo.h"
#include "swcdb/core/Serialization.h"
#include "swcdb/core/Checksum.h"
Go to the source code of this file.
Classes | |
struct | SWC::Comm::Header |
Namespaces | |
SWC | |
The SWC-DB C++ namespace 'SWC'. | |
SWC::Comm | |
The SWC-DB Communications C++ namespace 'SWC::Comm'. | |
Functions | |
struct SWC::Comm::Header | SWC::Comm::__attribute__ ((packed)) |
Header (uint64_t cmd=0, uint32_t timeout=0) noexcept | |
Header (const Header &init_from_req_header) noexcept | |
~Header () noexcept | |
void | reset () noexcept |
void | set (uint64_t cmd=0, uint32_t timeout=0) noexcept |
uint8_t | encoded_length () noexcept |
void | encode (uint8_t **bufp) const |
void | decode_prefix (const uint8_t **bufp, size_t *remainp) |
void | decode (const uint8_t **bufp, size_t *remainp) |
void | initialize_from_response (const Header &header) |
void | initialize_from_request (const Header &header) |
void | print (std::ostream &out) const |
Variables | |
static const uint8_t | PROTOCOL_VERSION = 1 |
static const uint8_t | PREFIX_LENGTH = 2 |
static const uint8_t | FIXED_LENGTH = PREFIX_LENGTH + 16 |
static const uint8_t | MAX_LENGTH = FIXED_LENGTH + 15 * 2 |
static const uint8_t | FLAG_REQUEST_BIT = 0x01 |
static const uint8_t | FLAG_REQUEST_MASK = 0xFE |
static const uint8_t | FLAG_RESPONSE_IGNORE_BIT = 0x02 |
static const uint8_t | FLAG_RESPONSE_PARTIAL_BIT = 0x04 |
static const uint8_t | FLAG_RESPONSE_PARTIAL_MASK = 0xFB |
uint8_t | version |
Protocol version. More... | |
uint8_t | header_len |
Length of header. More... | |
uint8_t | flags |
Flags. More... | |
uint8_t | buffers |
number of buffers from 0 to 2 (data+data_ext) More... | |
uint32_t | id |
Request ID. More... | |
uint32_t | timeout_ms |
Request timeout. More... | |
uint32_t | checksum |
Header checksum (excl. it self) More... | |
uint16_t | command |
Request command number. More... | |
BufferInfo | data |
Data Buffer. More... | |
BufferInfo | data_ext |
Data Extended Buffer. More... | |
void __attribute__::decode | ( | const uint8_t ** | bufp, |
size_t * | remainp | ||
) |
Definition at line 33 of file HeaderBufferInfo.h.
Referenced by SWC::Comm::Protocol::Bkr::Params::CellsSelectRsp::CellsSelectRsp(), SWC::Comm::Protocol::Bkr::Params::CellsUpdateRsp::CellsUpdateRsp(), SWC::Comm::Protocol::Mngr::Params::ColumnCompactRsp::ColumnCompactRsp(), SWC::Comm::Protocol::Rgr::Params::ColumnCompactRsp::ColumnCompactRsp(), SWC::DB::Cell::Serial::Value::FieldUpdate_Ext< UpdateField_T >::ext_decode(), SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::RangeLocateRsp(), SWC::Comm::Protocol::Rgr::Params::RangeQuerySelectRsp::RangeQuerySelectRsp(), SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::RangeQueryUpdateRsp(), and SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::RgrGetRsp().
void __attribute__::decode_prefix | ( | const uint8_t ** | bufp, |
size_t * | remainp | ||
) |
void __attribute__::encode | ( | uint8_t ** | bufp | ) | const |
Definition at line 24 of file HeaderBufferInfo.h.
Referenced by SWC::DB::Cell::Serial::Value::FieldUpdate_Ext< UpdateField_T >::ext_encode().
|
noexcept |
Referenced by SWC::DB::Cell::Serial::Value::FieldUpdate_Ext< UpdateField_T >::ext_encoded_length(), SWC::Common::Query::Update::Metric::Item_Net< SWC::Comm::Protocol::FsBroker::Commands >::report(), SWC::Common::Query::Update::Metric::Item_Mem::report(), and SWC::Common::Query::Update::Metric::Item_CPU::report().
|
explicitnoexcept |
|
noexcept |
void __attribute__::initialize_from_request | ( | const Header & | header | ) |
void __attribute__::initialize_from_response | ( | const Header & | header | ) |
void __attribute__::print | ( | std::ostream & | out | ) | const |
Referenced by SWC::DB::Cell::Serial::Value::FieldUpdate_Ext< UpdateField_T >::ext_print().
|
noexcept |
Definition at line 10 of file HeaderBufferInfo.h.
Referenced by SWC::client::Query::Update::Handlers::Base::get_resend_count().
|
noexcept |
Definition at line 33 of file Header.h.
Referenced by SWC::Comm::Protocol::FsBroker::Req::PreadSync::handle(), SWC::Comm::Protocol::FsBroker::Req::ReadSync::handle(), SWC::ThriftBroker::AppHandler::mng_column(), SWC::ThriftBroker::AppHandler::process_results(), SWC::ThriftBroker::AppHandler::set(), SWC::ThriftBroker::AppHandler::sync_select(), SWC::ThriftBroker::AppHandler::update_by_types(), SWC::ThriftBroker::AppHandler::update_counter(), SWC::ThriftBroker::AppHandler::update_plain(), and SWC::ThriftBroker::AppHandler::update_serial().
uint8_t buffers |
number of buffers from 0 to 2 (data+data_ext)
Definition at line 56 of file Header.h.
Referenced by SWC::Comm::ConnHandlerPlain::do_async_write(), SWC::Comm::ConnHandlerSSL::do_async_write(), and SWC::Comm::Buffers::get_buffers().
uint32_t checksum |
Header checksum (excl. it self)
Definition at line 59 of file Header.h.
Referenced by SWC::Core::checksum_i32(), SWC::Core::checksum_i32_chk(), SWC::Core::checksum_i32_log_chk(), and SWC::Comm::ConnHandler::Receiver_Buffer::operator()().
uint16_t command |
BufferInfo data |
BufferInfo data_ext |
|
static |
uint8_t flags |
Flags.
Definition at line 55 of file Header.h.
Referenced by SWC::FS::FileSystem::append(), SWC::FS::FileSystemBroker::append(), SWC::FS::FileSystemCeph::append(), SWC::FS::FileSystemHadoop::append(), SWC::FS::FileSystemHadoopJVM::append(), SWC::FS::FileSystemLocal::append(), SWC::Config::Property::Value::default_value(), SWC::DB::Cells::Cell::display(), SWC::DB::Specs::Interval::equal(), SWC::DB::Specs::Scan::equal(), SWC::Manager::ColumnHealthCheck::RangerCheck::handle(), SWC::DB::Specs::Interval::move(), SWC::client::SQL::QuerySelect::read_flags(), and SWC::Thrift::Converter::set().
uint32_t id |
Request ID.
Definition at line 57 of file Header.h.
Referenced by SWC::ThriftBroker::AppHandler::updater_create().
|
static |
uint32_t timeout_ms |
Request timeout.
Definition at line 58 of file Header.h.
Referenced by SWC::Thrift::Client::make(), and SWC::ThriftBroker::make_service().