CernVM-FS
2.12.0
|
#include <cache_transport.h>
Public Member Functions | |
Frame () | |
Frame (google::protobuf::MessageLite *m) | |
~Frame () | |
void | MergeFrom (const Frame &other) |
void | Reset (uint32_t original_att_size) |
void * | attachment () const |
uint32_t | att_size () const |
void | set_att_size (uint32_t size) |
void | set_attachment (void *attachment, uint32_t att_size) |
bool | ParseMsgRpc (void *buffer, uint32_t size) |
cvmfs::MsgRpc * | GetMsgRpc () |
google::protobuf::MessageLite * | GetMsgTyped () |
bool | IsMsgOutOfBand () |
Private Member Functions | |
void | WrapMsg () |
void | UnwrapMsg () |
void | Release () |
Private Member Functions inherited from SingleCopy | |
SingleCopy () | |
Private Attributes | |
cvmfs::MsgRpc | msg_rpc_ |
bool | owns_msg_typed_ |
google::protobuf::MessageLite * | msg_typed_ |
void * | attachment_ |
uint32_t | att_size_ |
bool | is_wrapped_ |
bool | is_msg_out_of_band_ |
A single unit of data transfer contains a "typed" Msg... protobuf message inside a MsgRpc message. Optionally, there can be an "attachment", which is a byte stream following the protobuf message. The typed message and the attachment buffer are (stack)-allocated by users of CacheTransport. The Frame subclass takes care of wrapping and unwrapping into/from MsgRpc message.
Definition at line 94 of file cache_transport.h.
CacheTransport::Frame::Frame | ( | ) |
Definition at line 53 of file cache_transport.cc.
|
explicit |
Definition at line 63 of file cache_transport.cc.
CacheTransport::Frame::~Frame | ( | ) |
Definition at line 73 of file cache_transport.cc.
|
inline |
Definition at line 103 of file cache_transport.h.
Referenced by ExternalCacheManager::CallRemotely(), CachePlugin::HandleStore(), ExternalCacheManager::Pread(), CacheTransport::RecvFrame(), CacheTransport::SendFrame(), and set_attachment().
|
inline |
Definition at line 102 of file cache_transport.h.
Referenced by CachePlugin::HandleStore(), CacheTransport::RecvFrame(), CacheTransport::SendFrame(), and set_attachment().
cvmfs::MsgRpc * CacheTransport::Frame::GetMsgRpc | ( | ) |
Called on the sender side to wrap a message into a MsgRpc message for wire transfer.
Definition at line 33 of file cache_transport.cc.
Referenced by CacheTransport::SendFrame().
google::protobuf::MessageLite * CacheTransport::Frame::GetMsgTyped | ( | ) |
Called on the receiving end of an RPC to extract the actual message from the MsgRpc.
Definition at line 45 of file cache_transport.cc.
Referenced by ExternalCacheManager::CallRemotely(), ExternalCacheManager::Create(), CachePlugin::HandleRequest(), ExternalCacheManager::MainRead(), ExternalCacheManager::RpcJob::msg_breadcrumb_reply(), ExternalCacheManager::RpcJob::msg_info_reply(), ExternalCacheManager::RpcJob::msg_list_reply(), ExternalCacheManager::RpcJob::msg_object_info_reply(), ExternalCacheManager::RpcJob::msg_read_reply(), ExternalCacheManager::RpcJob::msg_refcount_reply(), ExternalCacheManager::RpcJob::msg_shrink_reply(), and ExternalCacheManager::RpcJob::msg_store_reply().
bool CacheTransport::Frame::IsMsgOutOfBand | ( | ) |
Definition at line 78 of file cache_transport.cc.
Referenced by ExternalCacheManager::CallRemotely().
void CacheTransport::Frame::MergeFrom | ( | const Frame & | other | ) |
Definition at line 86 of file cache_transport.cc.
Referenced by ExternalCacheManager::MainRead().
bool CacheTransport::Frame::ParseMsgRpc | ( | void * | buffer, |
uint32_t | size | ||
) |
Definition at line 97 of file cache_transport.cc.
Referenced by CacheTransport::RecvFrame().
|
private |
Definition at line 108 of file cache_transport.cc.
void CacheTransport::Frame::Reset | ( | uint32_t | original_att_size | ) |
Definition at line 138 of file cache_transport.cc.
Referenced by ExternalCacheManager::CallRemotely().
|
inline |
Definition at line 104 of file cache_transport.h.
Referenced by CacheTransport::RecvFrame().
|
inline |
Definition at line 105 of file cache_transport.h.
Referenced by CachePlugin::HandleRead(), CachePlugin::HandleRequest(), ExternalCacheManager::MainRead(), ExternalCacheManager::RpcJob::set_attachment_recv(), and ExternalCacheManager::RpcJob::set_attachment_send().
|
private |
Definition at line 228 of file cache_transport.cc.
|
private |
Definition at line 149 of file cache_transport.cc.
|
private |
Definition at line 129 of file cache_transport.h.
Referenced by att_size(), MergeFrom(), set_att_size(), and set_attachment().
|
private |
Definition at line 128 of file cache_transport.h.
Referenced by attachment(), MergeFrom(), and set_attachment().
|
private |
Definition at line 131 of file cache_transport.h.
|
private |
Definition at line 130 of file cache_transport.h.
|
private |
Definition at line 121 of file cache_transport.h.
Referenced by MergeFrom().
|
private |
Can either point to a user-provided message (sender side) or to a message inside msg_rpc_ (receiving end)
Definition at line 127 of file cache_transport.h.
|
private |
Definition at line 122 of file cache_transport.h.