Line data Source code
1 : #include "source/common/api/api_impl.h" 2 : 3 : #include <chrono> 4 : #include <string> 5 : 6 : #include "envoy/config/bootstrap/v3/bootstrap.pb.h" 7 : 8 : #include "source/common/common/thread.h" 9 : #include "source/common/event/dispatcher_impl.h" 10 : 11 : namespace Envoy { 12 : namespace Api { 13 : 14 : Impl::Impl(Thread::ThreadFactory& thread_factory, Stats::Store& store, 15 : Event::TimeSystem& time_system, Filesystem::Instance& file_system, 16 : Random::RandomGenerator& random_generator, 17 : const envoy::config::bootstrap::v3::Bootstrap& bootstrap, 18 : const ProcessContextOptRef& process_context, 19 : Buffer::WatermarkFactorySharedPtr watermark_factory) 20 : : thread_factory_(thread_factory), store_(store), time_system_(time_system), 21 : file_system_(file_system), random_generator_(random_generator), bootstrap_(bootstrap), 22 2159 : process_context_(process_context), watermark_factory_(std::move(watermark_factory)) {} 23 : 24 948 : Event::DispatcherPtr Impl::allocateDispatcher(const std::string& name) { 25 948 : return std::make_unique<Event::DispatcherImpl>(name, *this, time_system_, watermark_factory_); 26 948 : } 27 : 28 : Event::DispatcherPtr 29 : Impl::allocateDispatcher(const std::string& name, 30 131 : const Event::ScaledRangeTimerManagerFactory& scaled_timer_factory) { 31 131 : return std::make_unique<Event::DispatcherImpl>(name, *this, time_system_, scaled_timer_factory, 32 131 : watermark_factory_); 33 131 : } 34 : 35 : Event::DispatcherPtr Impl::allocateDispatcher(const std::string& name, 36 98 : Buffer::WatermarkFactoryPtr&& factory) { 37 98 : return std::make_unique<Event::DispatcherImpl>(name, *this, time_system_, std::move(factory)); 38 98 : } 39 : 40 : } // namespace Api 41 : } // namespace Envoy