InfiniSQL  v0.1.2-alpha
Massive Scale Transaction Processing
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MessageTransaction Class Reference

Message variant for transaction processing. More...

#include <Message.h>

Inheritance diagram for MessageTransaction:
Collaboration diagram for MessageTransaction:

Classes

struct  transaction_s
 MessageTransaction POD (serializable by memcpy) data members. More...
 

Public Member Functions

 MessageTransaction ()
 
virtual ~MessageTransaction ()
 
size_t size ()
 get Message size More...
 
string * ser ()
 create string with serialized message More...
 
void package (class SerializedMessage &serobj)
 serialize this More...
 
void unpack (SerializedMessage &serobj)
 deserialize into this More...
 
void clear ()
 clear contents of this More...
 
- Public Member Functions inherited from Message
 Message ()
 
virtual ~Message ()
 
size_t size ()
 get Message size More...
 
std::string * ser ()
 create string with serialized message More...
 
void package (class SerializedMessage &serobj)
 serialize this More...
 
void unpack (SerializedMessage &serobj)
 deserialize into this More...
 
void clear ()
 clear contents of this More...
 
string * sermsg ()
 return serialized Message variant string More...
 
void setEnvelope (const Topology::addressStruct &source, const Topology::addressStruct &dest, class Message &msg)
 put addresses in Message variant envelope More...
 

Public Attributes

transaction_s transactionStruct
 
- Public Attributes inherited from Message
__int128 nextmsg
 
message_s messageStruct
 

Additional Inherited Members

- Static Public Member Functions inherited from Message
static class Messagedes (string *serstr)
 deserialize entire message More...
 

Detailed Description

Message variant for transaction processing.

Returns

Definition at line 378 of file Message.h.

Constructor & Destructor Documentation

MessageTransaction::MessageTransaction ( )

Definition at line 388 of file Message.cc.

389 {
390 }
MessageTransaction::~MessageTransaction ( )
virtual

Definition at line 392 of file Message.cc.

393 {
394 }

Member Function Documentation

void MessageTransaction::clear ( )

clear contents of this

Definition at line 426 of file Message.cc.

References Message::clear(), and transactionStruct.

Referenced by MessageSubtransactionCmd::clear(), and MessageCommitRollback::clear().

427 {
428  Message::clear();
430 }

Here is the call graph for this function:

Here is the caller graph for this function:

void MessageTransaction::package ( class SerializedMessage serobj)

serialize this

Parameters
serobjSerializedMessage

Definition at line 414 of file Message.cc.

References Message::package(), SerializedMessage::ser(), and transactionStruct.

Referenced by MessageSubtransactionCmd::package(), MessageCommitRollback::package(), and ser().

415 {
416  Message::package(serobj);
417  serobj.ser(transactionStruct);
418 }

Here is the call graph for this function:

Here is the caller graph for this function:

string * MessageTransaction::ser ( )

create string with serialized message

Returns
serialized message string

Definition at line 402 of file Message.cc.

References SerializedMessage::data, SerializedMessage::getpayloadtype(), logfile, package(), and SerializedMessage::pos.

403 {
404  class SerializedMessage serobj(size());
405  package(serobj);
406  if (serobj.data->size() != serobj.pos)
407  {
408  fprintf(logfile, "%s %i ser %i size %lu pos %lu\n", __FILE__, __LINE__,
409  serobj.getpayloadtype(), serobj.data->size(), serobj.pos);
410  }
411  return serobj.data;
412 }

Here is the call graph for this function:

size_t MessageTransaction::size ( )

get Message size

Returns
size in bytes

Definition at line 397 of file Message.cc.

References SerializedMessage::sersize(), Message::size(), and transactionStruct.

Referenced by MessageSubtransactionCmd::size(), and MessageCommitRollback::size().

Here is the call graph for this function:

Here is the caller graph for this function:

void MessageTransaction::unpack ( SerializedMessage serobj)

deserialize into this

Parameters
serobjSerializedMessage

Definition at line 420 of file Message.cc.

References SerializedMessage::des(), transactionStruct, and Message::unpack().

Referenced by MessageSubtransactionCmd::unpack(), and MessageCommitRollback::unpack().

421 {
422  Message::unpack(serobj);
423  serobj.des(transactionStruct);
424 }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation


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