CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CacheTransport::Frame Class Reference

#include <cache_transport.h>

Inheritance diagram for CacheTransport::Frame:
Collaboration diagram for CacheTransport::Frame:

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

CacheTransport::Frame::Frame ( )

Definition at line 53 of file cache_transport.cc.

CacheTransport::Frame::Frame ( google::protobuf::MessageLite *  m)
explicit

Definition at line 63 of file cache_transport.cc.

CacheTransport::Frame::~Frame ( )

Definition at line 73 of file cache_transport.cc.

Member Function Documentation

uint32_t CacheTransport::Frame::att_size ( ) const
inline
void* CacheTransport::Frame::attachment ( ) const
inline

Definition at line 102 of file cache_transport.h.

Referenced by CachePlugin::HandleStore(), CacheTransport::RecvFrame(), CacheTransport::SendFrame(), and set_attachment().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CacheTransport::Frame::IsMsgOutOfBand ( )

Definition at line 78 of file cache_transport.cc.

Referenced by ExternalCacheManager::CallRemotely().

Here is the call graph for this function:

Here is the caller graph for this function:

void CacheTransport::Frame::MergeFrom ( const Frame other)

Definition at line 86 of file cache_transport.cc.

Referenced by ExternalCacheManager::MainRead().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CacheTransport::Frame::ParseMsgRpc ( void *  buffer,
uint32_t  size 
)

Definition at line 97 of file cache_transport.cc.

Referenced by CacheTransport::RecvFrame().

Here is the caller graph for this function:

void CacheTransport::Frame::Release ( )
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().

Here is the caller graph for this function:

void CacheTransport::Frame::set_att_size ( uint32_t  size)
inline

Definition at line 104 of file cache_transport.h.

Referenced by CacheTransport::RecvFrame().

Here is the caller graph for this function:

void CacheTransport::Frame::set_attachment ( void *  attachment,
uint32_t  att_size 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CacheTransport::Frame::UnwrapMsg ( )
private

Definition at line 228 of file cache_transport.cc.

void CacheTransport::Frame::WrapMsg ( )
private

Definition at line 149 of file cache_transport.cc.

Member Data Documentation

uint32_t CacheTransport::Frame::att_size_
private

Definition at line 129 of file cache_transport.h.

Referenced by att_size(), MergeFrom(), set_att_size(), and set_attachment().

void* CacheTransport::Frame::attachment_
private

Definition at line 128 of file cache_transport.h.

Referenced by attachment(), MergeFrom(), and set_attachment().

bool CacheTransport::Frame::is_msg_out_of_band_
private

Definition at line 131 of file cache_transport.h.

bool CacheTransport::Frame::is_wrapped_
private

Definition at line 130 of file cache_transport.h.

cvmfs::MsgRpc CacheTransport::Frame::msg_rpc_
private

Definition at line 121 of file cache_transport.h.

Referenced by MergeFrom().

google::protobuf::MessageLite* CacheTransport::Frame::msg_typed_
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.

bool CacheTransport::Frame::owns_msg_typed_
private

Definition at line 122 of file cache_transport.h.


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