Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
InitialLoadObserverInterface.hpp
1//------------------------------------------------------------------------------
2/*
3 This file is part of clio: https://github.com/XRPLF/clio
4 Copyright (c) 2024, the clio developers.
5
6 Permission to use, copy, modify, and distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#pragma once
21
22#include "etlng/Models.hpp"
23
24#include <xrpl/protocol/LedgerHeader.h>
25
26#include <cstdint>
27#include <optional>
28#include <string>
29#include <vector>
30
31namespace etlng {
32
37 virtual ~InitialLoadObserverInterface() = default;
38
46 virtual void
48 uint32_t seq,
49 std::vector<model::Object> const& data,
50 std::optional<std::string> lastKey = std::nullopt
51 ) = 0;
52};
53
54} // namespace etlng
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70
The interface for observing the initial ledger load.
Definition InitialLoadObserverInterface.hpp:36
virtual void onInitialLoadGotMoreObjects(uint32_t seq, std::vector< model::Object > const &data, std::optional< std::string > lastKey=std::nullopt)=0
Callback for each incoming batch of objects during initial ledger load.