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

Message variant for acknowledgement of synchronous replication. More...

#include <Message.h>

Inheritance diagram for MessageAckDispatch:
Collaboration diagram for MessageAckDispatch:

Classes

struct  ackdispatch_s
 MessageAckDispatch POD (serializable by memcpy) data members. More...
 

Public Member Functions

 MessageAckDispatch ()
 
 MessageAckDispatch (int64_t transactionidarg, int statusarg)
 
virtual ~MessageAckDispatch ()
 
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

ackdispatch_s ackdispatchStruct
 
- 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 acknowledgement of synchronous replication.

Returns

Definition at line 622 of file Message.h.

Constructor & Destructor Documentation

MessageAckDispatch::MessageAckDispatch ( )

Definition at line 608 of file Message.cc.

609 {
610 }
MessageAckDispatch::MessageAckDispatch ( int64_t  transactionidarg,
int  statusarg 
)

Message variant for acknowledgement of synchronous replication

Parameters
transactionidargtransactionid
statusargreplication status
Returns

Definition at line 612 of file Message.cc.

612  :
613  ackdispatchStruct ({transactionidarg, statusarg})
MessageAckDispatch::~MessageAckDispatch ( )
virtual

Definition at line 619 of file Message.cc.

620 {
621 }

Member Function Documentation

void MessageAckDispatch::clear ( )

clear contents of this

Definition at line 652 of file Message.cc.

References ackdispatchStruct, and Message::clear().

653 {
654  Message::clear();
656 }

Here is the call graph for this function:

void MessageAckDispatch::package ( class SerializedMessage serobj)

serialize this

Parameters
serobjSerializedMessage

Definition at line 640 of file Message.cc.

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

Referenced by ser().

641 {
642  Message::package(serobj);
643  serobj.ser(ackdispatchStruct);
644 }

Here is the call graph for this function:

Here is the caller graph for this function:

string * MessageAckDispatch::ser ( )

create string with serialized message

Returns
serialized message string

Definition at line 628 of file Message.cc.

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

629 {
630  class SerializedMessage serobj(size());
631  package(serobj);
632  if (serobj.data->size() != serobj.pos)
633  {
634  fprintf(logfile, "%s %i ser %i size %lu pos %lu\n", __FILE__, __LINE__,
635  serobj.getpayloadtype(), serobj.data->size(), serobj.pos);
636  }
637  return serobj.data;
638 }

Here is the call graph for this function:

size_t MessageAckDispatch::size ( )

get Message size

Returns
size in bytes

Definition at line 623 of file Message.cc.

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

Here is the call graph for this function:

void MessageAckDispatch::unpack ( SerializedMessage serobj)

deserialize into this

Parameters
serobjSerializedMessage

Definition at line 646 of file Message.cc.

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

Referenced by Message::des().

647 {
648  Message::unpack(serobj);
649  serobj.des(ackdispatchStruct);
650 }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

ackdispatch_s MessageAckDispatch::ackdispatchStruct

Definition at line 677 of file Message.h.

Referenced by clear(), package(), size(), TransactionAgent::TransactionAgent(), and unpack().


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