OnixS C++ CME MDP Conflated TCP Handler 1.3.6
API Documentation
Loading...
Searching...
No Matches
SessionStorage.h
Go to the documentation of this file.
1#pragma once
2
3/*
4* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
5*
6* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
7* and international copyright treaties.
8*
9* Access to and use of the software is governed by the terms of the applicable OnixS Software
10* Services Agreement (the Agreement) and Customer end user license agreements granting
11* a non-assignable, non-transferable and non-exclusive license to use the software
12* for it's own data processing purposes under the terms defined in the Agreement.
13*
14* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
15* of this source code or associated reference material to any other location for further reproduction
16* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
17*
18* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
19* the terms of the Agreement is a violation of copyright law.
20*/
21
27
28#include <string>
29#include <vector>
30
31namespace OnixS {
32namespace CME {
33namespace ConflatedTCP {
34
35using namespace OnixS::CME::ConflatedTCP::Messaging;
36
63
66{
67public:
68
71
73 virtual const std::string & id() const = 0;
74
76 virtual UInt64 uuid() const = 0;
77
79 virtual void uuid(UInt64 value) = 0;
80
87 virtual UInt64 previousUuid() const = 0;
88
90 virtual void previousUuid(UInt64 value) = 0;
91
93 virtual SeqNumber inSeqNum() const = 0;
94
96 virtual void inSeqNum(SeqNumber msgSeqNum) = 0;
97
103 virtual SeqNumber previousSeqNum() const = 0;
104
106 virtual void previousSeqNum(SeqNumber msgSeqNum) = 0;
107
109 virtual SeqNumber outSeqNum() const = 0;
110
112 virtual void outSeqNum(SeqNumber msgSeqNum) = 0;
113
115 virtual bool terminated() const = 0;
116
118 virtual void terminated(bool terminated) = 0;
119
121 virtual Timestamp sessionCreationTime() const = 0;
122
125
127 virtual void clear() = 0;
128
130 virtual void close(bool terminate = false, bool doBackup = false) = 0;
131
134 {
135 RawMessagePointer(const char *buffer = ONIXS_CONFLATEDTCP_NULLPTR, size_t length = 0)
136 : buffer_(buffer)
137 , length_(length)
138 {}
139
141 const char *buffer_;
142
143 size_t length_;
144 };
145
147 virtual void storeInboundMessage(const RawMessagePointer & rawMsg, SeqNumber msgSeqNum, bool isOriginal, Timestamp messageReceivingUtcTimestamp = Timestamp()) = 0;
148
150 virtual void storeOutboundMessage(const RawMessagePointer & rawMsg, SeqNumber msgSeqNum, bool isOriginal = true, bool warmUp = false, Timestamp messageSendingUtcTimestamp = Timestamp()) = 0;
151
153 virtual void flush() = 0;
154};
155
156}
157}
158}
#define ONIXS_CONFLATEDTCP_EXPORTED
Definition Compiler.h:175
#define ONIXS_CONFLATEDTCP_NULLPTR
Definition Compiler.h:182
#define ONIXS_CONFLATEDTCP_DEFAULT
Definition Compiler.h:202
The time point without the time-zone information.
Definition Time.h:468
virtual void flush()=0
Flushes all internal buffers.
virtual void clear()=0
Clears the storage.
virtual UInt64 previousUuid() const =0
virtual ~SessionStorage()=default
Destructor.
virtual void close(bool terminate=false, bool doBackup=false)=0
Closes the storage.
virtual SeqNumber inSeqNum() const =0
virtual void storeOutboundMessage(const RawMessagePointer &rawMsg, SeqNumber msgSeqNum, bool isOriginal=true, bool warmUp=false, Timestamp messageSendingUtcTimestamp=Timestamp())=0
Logs the given outgoing message.
virtual void storeInboundMessage(const RawMessagePointer &rawMsg, SeqNumber msgSeqNum, bool isOriginal, Timestamp messageReceivingUtcTimestamp=Timestamp())=0
Logs the given inbound message.
virtual Timestamp sessionCreationTime() const =0
virtual SeqNumber previousSeqNum() const =0
virtual SeqNumber outSeqNum() const =0
Messaging::UInt32 SeqNumber
Definition Messaging.h:58
static Enum parse(const std::string &)
@ AsyncFileBased
Asynchronous File-Based Session Storage.
@ MemoryBased
Memory-based Session Storage.
static const char * toString(SessionStorageType::Enum)
RawMessagePointer(const char *buffer=nullptr, size_t length=0)