OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
MySessionStorage.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable OnixS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19#pragma once
20
22
23#include <vector>
24#include <list>
25
26namespace Samples {
27
28using namespace ONIXS_ICEBOE_NAMESPACE;
30
31class MySessionStorage final : public SessionStorage
32{
33public:
35
36 const std::string & id() const override;
37
38 SeqNumber inSeqNum() const override;
39
40 void inSeqNum(SeqNumber msgSeqNum) override;
41
42 SeqNumber outSeqNum() const override;
43
44 void outSeqNum(SeqNumber msgSeqNum) override;
45
46 Timestamp sessionCreationTime() const override;
47
48 void sessionCreationTime(Timestamp) override;
49
50 void close(bool doBackup = false) override;
51
52 void storeInboundMessage(const NetworkMessage message, SeqNumber msgSeqNum, Timestamp messageReceivingUtcTimestamp = Timestamp()) override;
53
54 void storeOutboundMessage(const NetworkMessage message, SeqNumber msgSeqNum, Timestamp messageSendingUtcTimestamp = Timestamp()) override;
55
56 void flush() override;
57
58 void warmup(size_t, Timestamp) override;
59
60 using Message = std::vector<char>;
61 using Messages = std::list<Message>;
62
63private:
64 SeqNumber inSeqNum_;
65 SeqNumber outSeqNum_;
66 std::string id_;
67 bool terminated_;
68 Timestamp sessionCreationTime_;
69 Messages inboundMessages_;
70 Messages outboundMessages_;
71};
72
73}
#define ONIXS_ICEBOE_NAMESPACE
Definition ABI.h:113
#define ONIXS_ICEBOE_MESSAGING_NAMESPACE
Definition ABI.h:114
The time point without the time-zone information.
Definition Time.h:470
void flush() override
Flushes all internal buffers.
void storeOutboundMessage(const NetworkMessage message, SeqNumber msgSeqNum, Timestamp messageSendingUtcTimestamp=Timestamp()) override
Logs the given outgoing message.
Timestamp sessionCreationTime() const override
std::vector< char > Message
void close(bool doBackup=false) override
Closes the storage.
void warmup(size_t, Timestamp) override
Warmup the storage.
SeqNumber outSeqNum() const override
SeqNumber inSeqNum() const override
std::list< Message > Messages
void storeInboundMessage(const NetworkMessage message, SeqNumber msgSeqNum, Timestamp messageReceivingUtcTimestamp=Timestamp()) override
Logs the given inbound message.
const std::string & id() const override
decltype(std::declval< const Messaging::SbeMessage & >().sequenceId()) SeqNumber
Definition Messaging.h:53