Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cMessageQueue.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cMessageQueue_H
7 #define _INC_cMessageQueue_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "../GrayLibBase.h"
13 
14 namespace GrayLib
15 {
16  interface IMessageInQueue
17  {
22 
23  // should be synchronous, that is when it completes,
24  // we want to be sure(what sure means exactly may vary) that the messages are sent
25  void send();
26 
27  // should receive messages from the queue and block them;
28  // if the node crashes, the messages should be returned to the queue and re - delivered
29  void receive();
30 
31  // acknowledge delivery and processing of the messages. This message is done.
32  // Acknowledgments can be asynchronous, that is we don’t have to be sure that the messages really got deleted.
33  void ack();
34  };
35 
37  {
44 
45  public:
46  cMessageQueue();
47  virtual ~cMessageQueue();
48  };
49 
50 }
51 
52 #endif
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cMessageQueue.h:37
Definition: cMesh.h:22
void receive()
void ack()