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

Message variant for DeadlockMgr activities. More...

#include <Message.h>

Inheritance diagram for MessageDeadlock:
Collaboration diagram for MessageDeadlock:

Classes

struct  deadlock_s
 MessageDeadlock POD (serializable by memcpy) data members. More...
 

Public Member Functions

 MessageDeadlock ()
 
virtual ~MessageDeadlock ()
 
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

deadlock_s deadlockStruct
 
std::string deadlockNode
 
newDeadLockLists_s nodes
 
- 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 DeadlockMgr activities.

Returns

Definition at line 320 of file Message.h.

Constructor & Destructor Documentation

MessageDeadlock::MessageDeadlock ( )
MessageDeadlock::~MessageDeadlock ( )
virtual

Definition at line 341 of file Message.cc.

342 {
343 }

Member Function Documentation

void MessageDeadlock::clear ( )

clear contents of this

Definition at line 380 of file Message.cc.

References Message::clear(), deadlockNode, deadlockStruct, and nodes.

381 {
382  Message::clear();
383  deadlockStruct={};
384  deadlockNode.clear();
385  nodes={};
386 }

Here is the call graph for this function:

void MessageDeadlock::package ( class SerializedMessage serobj)

serialize this

Parameters
serobjSerializedMessage

Definition at line 364 of file Message.cc.

References deadlockNode, deadlockStruct, nodes, Message::package(), and SerializedMessage::ser().

Referenced by ser().

365 {
366  Message::package(serobj);
367  serobj.ser(deadlockStruct);
368  serobj.ser(deadlockNode);
369  serobj.ser(nodes);
370 }

Here is the call graph for this function:

Here is the caller graph for this function:

string * MessageDeadlock::ser ( )

create string with serialized message

Returns
serialized message string

Definition at line 352 of file Message.cc.

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

353 {
354  class SerializedMessage serobj(size());
355  package(serobj);
356  if (serobj.data->size() != serobj.pos)
357  {
358  fprintf(logfile, "%s %i ser %i size %lu pos %lu\n", __FILE__, __LINE__,
359  serobj.getpayloadtype(), serobj.data->size(), serobj.pos);
360  }
361  return serobj.data;
362 }

Here is the call graph for this function:

size_t MessageDeadlock::size ( )

get Message size

Returns
size in bytes

Definition at line 345 of file Message.cc.

References deadlockNode, deadlockStruct, nodes, SerializedMessage::sersize(), and Message::size().

Here is the call graph for this function:

void MessageDeadlock::unpack ( SerializedMessage serobj)

deserialize into this

Parameters
serobjSerializedMessage

Definition at line 372 of file Message.cc.

References deadlockNode, deadlockStruct, SerializedMessage::des(), nodes, and Message::unpack().

Referenced by Message::des().

373 {
374  Message::unpack(serobj);
375  serobj.des(deadlockStruct);
376  serobj.des(deadlockNode);
377  serobj.des(nodes);
378 }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::string MessageDeadlock::deadlockNode

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