83 std::reference_wrapper<util::config::ClioConfigDefinition const> config_;
84 std::shared_ptr<BackendInterface> backend_;
85 std::shared_ptr<LoadBalancerInterface> balancer_;
86 std::shared_ptr<NetworkValidatedLedgersInterface> ledgers_;
87 std::shared_ptr<LedgerPublisherInterface> publisher_;
88 std::shared_ptr<CacheLoaderInterface> cacheLoader_;
89 std::shared_ptr<CacheUpdaterInterface> cacheUpdater_;
90 std::shared_ptr<ExtractorInterface> extractor_;
91 std::shared_ptr<LoaderInterface> loader_;
92 std::shared_ptr<InitialLoadObserverInterface> initialLoadObserver_;
93 std::shared_ptr<TaskManagerProviderInterface> taskManagerProvider_;
94 std::shared_ptr<MonitorProviderInterface> monitorProvider_;
95 std::shared_ptr<SystemState> state_;
97 std::optional<uint32_t> startSequence_;
98 std::optional<uint32_t> finishSequence_;
100 std::unique_ptr<MonitorInterface> monitor_;
101 std::unique_ptr<TaskManagerInterface> taskMan_;
103 boost::signals2::scoped_connection monitorNewSeqSubscription_;
104 boost::signals2::scoped_connection monitorDbStalledSubscription_;
105 boost::signals2::scoped_connection systemStateWriteCommandSubscription_;
107 std::atomic<size_t> runningWriteCommandHandlers_{0};
109 std::optional<util::async::AnyOperation<void>> mainLoop_;
127 static std::shared_ptr<ETLServiceInterface>
130 std::shared_ptr<SystemState> state,
131 std::unique_ptr<data::LedgerCacheLoadingStateInterface const> cacheLoadingState,
133 std::shared_ptr<BackendInterface> backend,
134 std::shared_ptr<feed::SubscriptionManagerInterface> subscriptions,
135 std::shared_ptr<LoadBalancerInterface> balancer,
136 std::shared_ptr<NetworkValidatedLedgersInterface> ledgers
159 std::reference_wrapper<util::config::ClioConfigDefinition const> config,
160 std::shared_ptr<data::BackendInterface> backend,
161 std::shared_ptr<LoadBalancerInterface> balancer,
162 std::shared_ptr<NetworkValidatedLedgersInterface> ledgers,
163 std::shared_ptr<LedgerPublisherInterface> publisher,
164 std::shared_ptr<CacheLoaderInterface> cacheLoader,
165 std::shared_ptr<CacheUpdaterInterface> cacheUpdater,
166 std::shared_ptr<ExtractorInterface> extractor,
167 std::shared_ptr<LoaderInterface> loader,
168 std::shared_ptr<InitialLoadObserverInterface> initialLoadObserver,
169 std::shared_ptr<TaskManagerProviderInterface> taskManagerProvider,
170 std::shared_ptr<MonitorProviderInterface> monitorProvider,
171 std::shared_ptr<SystemState> state
191 std::optional<ETLState>
198 std::optional<data::LedgerRange>
199 loadInitialLedgerIfNeeded();
201 [[nodiscard]] uint32_t
205 updateCache(uint32_t seq);
208 startMonitor(uint32_t seq);
211 startLoading(uint32_t seq);
214 attemptTakeoverWriter();
static std::shared_ptr< ETLServiceInterface > makeETLService(util::config::ClioConfigDefinition const &config, std::shared_ptr< SystemState > state, std::unique_ptr< data::LedgerCacheLoadingStateInterface const > cacheLoadingState, util::async::AnyExecutionContext ctx, std::shared_ptr< BackendInterface > backend, std::shared_ptr< feed::SubscriptionManagerInterface > subscriptions, std::shared_ptr< LoadBalancerInterface > balancer, std::shared_ptr< NetworkValidatedLedgersInterface > ledgers)
A factory function to spawn new ETLService instances.
Definition ETLService.cpp:61
ETLService(util::async::AnyExecutionContext ctx, std::reference_wrapper< util::config::ClioConfigDefinition const > config, std::shared_ptr< data::BackendInterface > backend, std::shared_ptr< LoadBalancerInterface > balancer, std::shared_ptr< NetworkValidatedLedgersInterface > ledgers, std::shared_ptr< LedgerPublisherInterface > publisher, std::shared_ptr< CacheLoaderInterface > cacheLoader, std::shared_ptr< CacheUpdaterInterface > cacheUpdater, std::shared_ptr< ExtractorInterface > extractor, std::shared_ptr< LoaderInterface > loader, std::shared_ptr< InitialLoadObserverInterface > initialLoadObserver, std::shared_ptr< TaskManagerProviderInterface > taskManagerProvider, std::shared_ptr< MonitorProviderInterface > monitorProvider, std::shared_ptr< SystemState > state)
Create an instance of ETLService.
Definition ETLService.cpp:129
A type-erased execution context.
Definition AnyExecutionContext.hpp:22