GM6000 Digital Heater Controller Branch: main
SDX-1330
FlushRequest.h
Go to the documentation of this file.
1#ifndef Cpl_Dm_Persistent_FlushRequest_h_
2#define Cpl_Dm_Persistent_FlushRequest_h_
3/*-----------------------------------------------------------------------------
4* This file is part of the Colony.Core Project. The Colony.Core Project is an
5* open source project with a BSD type of licensing agreement. See the license
6* agreement (license.txt) in the top/ directory or on the Internet at
7* http://integerfox.com/colony.core/license.txt
8*
9* Copyright (c) 2014-2022 John T. Taylor
10*
11* Redistributions of the source code must retain the above copyright notice.
12*----------------------------------------------------------------------------*/
13/** @file */
14
15
18#include "Cpl/Itc/SAP.h"
19
20///
21namespace Cpl {
22///
23namespace Dm {
24///
25namespace Persistent {
26
27
28/** This abstract class define ITC message type and payload for the application
29 to request flushing the Record to persistent storage
30
31 See the Cpl/Itc/README.txt file for the semantics for the 'ownership' of the
32 payload contents.
33
34 NOTE: This interface can/should NOT be used synchronously. The application
35 is required to only use asynchronous semantics.
36 */
38{
39public:
40 /// SAP for this API
42
43public:
44 /// Payload for Message: GetLatest
45 class Payload
46 {
47 public:
48 /** Flush results (response field)
49 true = the Record was successfully written to persistent storage
50 false = an error occurred and the state of record in persistent storage is unknown
51 */
53
54 public:
55 /// Constructor.
56 Payload() :m_success( false ) {}
57 };
58
59
60public:
61 /// Message Type: GetLatest
63
64 /// Request: Flush message
65 virtual void request( FlushMsg& msg ) = 0;
66
67public:
68 /// Virtual Destructor
69 virtual ~FlushRequest() {}
70};
71
72
73/** This abstract class define ITC message type and payload for asynchronous
74 response (to the application) of a Flush message.
75
76 The Application is responsible for implementing the response method(s).
77 */
79{
80public:
81 /// Response Message Type
85
86public:
87 /// Response
88 virtual void response( FlushMsg& msg ) = 0;
89
90
91public:
92 /// Virtual destructor
93 virtual ~FlushResponse() {}
94};
95
96
97}; // end namespaces
98};
99};
100#endif // end header latch
Payload for Message: GetLatest.
Definition FlushRequest.h:46
Payload()
Constructor.
Definition FlushRequest.h:56
bool m_success
Flush results (response field) true = the Record was successfully written to persistent storage false...
Definition FlushRequest.h:52
This abstract class define ITC message type and payload for the application to request flushing the R...
Definition FlushRequest.h:38
virtual void request(FlushMsg &msg)=0
Request: Flush message.
Cpl::Itc::RequestMessage< FlushRequest, Payload > FlushMsg
Message Type: GetLatest.
Definition FlushRequest.h:62
virtual ~FlushRequest()
Virtual Destructor.
Definition FlushRequest.h:69
Cpl::Itc::SAP< FlushRequest > SAP
SAP for this API.
Definition FlushRequest.h:41
This abstract class define ITC message type and payload for asynchronous response (to the application...
Definition FlushRequest.h:79
Cpl::Itc::ResponseMessage< FlushResponse, FlushRequest, FlushRequest::Payload > FlushMsg
Response Message Type.
Definition FlushRequest.h:84
virtual void response(FlushMsg &msg)=0
Response.
virtual ~FlushResponse()
Virtual destructor.
Definition FlushRequest.h:93
This template class represents a service request message to a particular server.
Definition RequestMessage.h:34
This template class represents a client response message, which is posted to the client's mailbox aft...
Definition ResponseMessage.h:40
This concrete template class represents the interface to a ITC Service Access Point (SAP).
Definition SAP.h:30
The 'Cpl' namespace is the root name space for the Colony.
Definition Api16.h:20