25 #ifndef NET_INSTAWEB_APACHE_MOD_SPDY_FETCH_CONTROLLER_H_
26 #define NET_INSTAWEB_APACHE_MOD_SPDY_FETCH_CONTROLLER_H_
29 #include "pagespeed/kernel/base/atomic_bool.h"
30 #include "pagespeed/kernel/base/basictypes.h"
31 #include "pagespeed/kernel/base/string.h"
32 #include "pagespeed/kernel/thread/queued_worker_pool.h"
34 namespace net_instaweb {
47 ThreadSystem* thread_system,
49 Statistics* statistics);
53 static void InitStats(Statistics* statistics);
57 ModSpdyFetcher* fetcher,
const GoogleString& url, Statistics* stats,
58 MessageHandler* message_handler,
AsyncFetch* fetch);
63 bool is_shut_down()
const {
return shutdown_.value(); }
65 Timer* timer()
const {
return timer_; }
68 class FetchDispatcher;
71 RateController rate_controller_;
72 QueuedWorkerPool thread_pool_;
Definition: mod_spdy_fetch_controller.h:43
void ScheduleBlockingFetch(ModSpdyFetcher *fetcher, const GoogleString &url, Statistics *stats, MessageHandler *message_handler, AsyncFetch *fetch)
Arranges for fetcher->BlockingFetch to be called on our thread pool.
ModSpdyFetchController(int num_threads, ThreadSystem *thread_system, Timer *timer, Statistics *statistics)
Note: RateController::InitStats must have been called before using this.
void ShutDown()
Definition: mod_spdy_fetch_controller.h:62
static void InitStats(Statistics *statistics)
This must be called for every statistics object in use before using this.
Definition: async_fetch.h:53
Definition: mod_spdy_fetcher.h:46