98 std::reference_wrapper<util::config::ClioConfigDefinition const> config_;
99 std::shared_ptr<BackendInterface> backend_;
100 std::shared_ptr<LoadBalancerInterface> balancer_;
101 std::shared_ptr<NetworkValidatedLedgersInterface> ledgers_;
102 std::shared_ptr<LedgerPublisherInterface> publisher_;
103 std::shared_ptr<CacheLoaderInterface> cacheLoader_;
104 std::shared_ptr<CacheUpdaterInterface> cacheUpdater_;
105 std::shared_ptr<ExtractorInterface> extractor_;
106 std::shared_ptr<LoaderInterface> loader_;
107 std::shared_ptr<InitialLoadObserverInterface> initialLoadObserver_;
108 std::shared_ptr<TaskManagerProviderInterface> taskManagerProvider_;
109 std::shared_ptr<MonitorProviderInterface> monitorProvider_;
110 std::shared_ptr<SystemState> state_;
112 std::optional<uint32_t> startSequence_;
113 std::optional<uint32_t> finishSequence_;
115 std::unique_ptr<MonitorInterface> monitor_;
116 std::unique_ptr<TaskManagerInterface> taskMan_;
118 boost::signals2::scoped_connection monitorNewSeqSubscription_;
119 boost::signals2::scoped_connection monitorDbStalledSubscription_;
121 std::optional<util::async::AnyOperation<void>> mainLoop_;
137 static std::shared_ptr<ETLServiceInterface>
141 std::shared_ptr<BackendInterface> backend,
142 std::shared_ptr<feed::SubscriptionManagerInterface> subscriptions,
143 std::shared_ptr<LoadBalancerInterface> balancer,
144 std::shared_ptr<NetworkValidatedLedgersInterface> ledgers
167 std::reference_wrapper<util::config::ClioConfigDefinition const> config,
168 std::shared_ptr<data::BackendInterface> backend,
169 std::shared_ptr<LoadBalancerInterface> balancer,
170 std::shared_ptr<NetworkValidatedLedgersInterface> ledgers,
171 std::shared_ptr<LedgerPublisherInterface> publisher,
172 std::shared_ptr<CacheLoaderInterface> cacheLoader,
173 std::shared_ptr<CacheUpdaterInterface> cacheUpdater,
174 std::shared_ptr<ExtractorInterface> extractor,
175 std::shared_ptr<LoaderInterface> loader,
176 std::shared_ptr<InitialLoadObserverInterface> initialLoadObserver,
177 std::shared_ptr<TaskManagerProviderInterface> taskManagerProvider,
178 std::shared_ptr<MonitorProviderInterface> monitorProvider,
179 std::shared_ptr<SystemState> state
199 std::optional<ETLState>
206 std::optional<data::LedgerRange>
207 loadInitialLedgerIfNeeded();
210 startMonitor(uint32_t seq);
213 startLoading(uint32_t seq);
216 attemptTakeoverWriter();
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:144
static std::shared_ptr< ETLServiceInterface > makeETLService(util::config::ClioConfigDefinition const &config, 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:79
A type-erased execution context.
Definition AnyExecutionContext.hpp:41