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

Message variant for Applier activities. More...

#include <Message.h>

Inheritance diagram for MessageApply:
Collaboration diagram for MessageApply:

Classes

struct  apply_s
 MessageApply POD (serializable by memcpy) data members. More...
 
struct  applyindex_s
 

Public Member Functions

 MessageApply ()
 
 MessageApply (int64_t subtransactionidarg, int64_t applieridarg, int64_t domainidarg)
 Message variant for Applier activities. More...
 
virtual ~MessageApply ()
 
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...
 

Static Public Member Functions

static void setisaddflag (char *c)
 set flag for new index entry More...
 
static char getisaddflag (char c)
 get flag for new index entry More...
 
static void cleariaddflag (char *c)
 clear flag for new index entry More...
 
- Static Public Member Functions inherited from Message
static class Messagedes (string *serstr)
 deserialize entire message More...
 

Public Attributes

apply_s applyStruct
 
std::vector
< MessageDispatch::record_s
rows
 
std::vector< applyindex_sindices
 
- Public Attributes inherited from Message
__int128 nextmsg
 
message_s messageStruct
 

Detailed Description

Message variant for Applier activities.

Returns

Definition at line 688 of file Message.h.

Constructor & Destructor Documentation

MessageApply::MessageApply ( )

Definition at line 658 of file Message.cc.

659 {
660 }
MessageApply::MessageApply ( int64_t  subtransactionidarg,
int64_t  applieridarg,
int64_t  domainidarg 
)

Message variant for Applier activities.

Parameters
subtransactionidargsubtransactionid
applieridargapplierid
domainidargdomainid
Returns

Definition at line 662 of file Message.cc.

663  :
664  applyStruct ({subtransactionidarg, applieridarg, domainidarg})
MessageApply::~MessageApply ( )
virtual

Definition at line 670 of file Message.cc.

671 {
672 }

Member Function Documentation

void MessageApply::clear ( )

clear contents of this

Definition at line 709 of file Message.cc.

References applyStruct, Message::clear(), indices, and rows.

710 {
711  Message::clear();
712  applyStruct={};
713  rows.clear();
714  indices={};
715 }

Here is the call graph for this function:

void MessageApply::cleariaddflag ( char *  c)
static

clear flag for new index entry

Parameters
cflags

Definition at line 727 of file Message.cc.

References ADDFLAG.

728 {
729  *c &= ~(1 << ADDFLAG);
730 }
char MessageApply::getisaddflag ( char  c)
static

get flag for new index entry

Parameters
cflags

Definition at line 722 of file Message.cc.

References ADDFLAG.

Referenced by Engine::applyItem().

723 {
724  return c & 1 << ADDFLAG;
725 }

Here is the caller graph for this function:

void MessageApply::package ( class SerializedMessage serobj)

serialize this

Parameters
serobjSerializedMessage

Definition at line 693 of file Message.cc.

References applyStruct, indices, Message::package(), rows, and SerializedMessage::ser().

Referenced by ser().

694 {
695  Message::package(serobj);
696  serobj.ser(applyStruct);
697  serobj.ser(rows);
698  serobj.ser(indices);
699 }

Here is the call graph for this function:

Here is the caller graph for this function:

string * MessageApply::ser ( )

create string with serialized message

Returns
serialized message string

Definition at line 681 of file Message.cc.

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

682 {
683  class SerializedMessage serobj(size());
684  package(serobj);
685  if (serobj.data->size() != serobj.pos)
686  {
687  fprintf(logfile, "%s %i ser %i size %lu pos %lu\n", __FILE__, __LINE__,
688  serobj.getpayloadtype(), serobj.data->size(), serobj.pos);
689  }
690  return serobj.data;
691 }

Here is the call graph for this function:

void MessageApply::setisaddflag ( char *  c)
static

set flag for new index entry

Parameters
cflags

Definition at line 717 of file Message.cc.

References ADDFLAG.

Referenced by TransactionAgent::handledispatch().

718 {
719  *c |= 1 << ADDFLAG;
720 }

Here is the caller graph for this function:

size_t MessageApply::size ( )

get Message size

Returns
size in bytes

Definition at line 674 of file Message.cc.

References applyStruct, indices, rows, SerializedMessage::sersize(), and Message::size().

Here is the call graph for this function:

void MessageApply::unpack ( SerializedMessage serobj)

deserialize into this

Parameters
serobjSerializedMessage

Definition at line 701 of file Message.cc.

References applyStruct, SerializedMessage::des(), indices, rows, and Message::unpack().

Referenced by Message::des().

702 {
703  Message::unpack(serobj);
704  serobj.des(applyStruct);
705  serobj.des(rows);
706  serobj.des(indices);
707 }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

apply_s MessageApply::applyStruct

Definition at line 773 of file Message.h.

Referenced by Engine::apply(), Engine::background(), clear(), package(), size(), and unpack().

std::vector<applyindex_s> MessageApply::indices

Definition at line 776 of file Message.h.

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

std::vector<MessageDispatch::record_s> MessageApply::rows

Definition at line 775 of file Message.h.

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


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