21 #ifndef REQUEST_MANAGER_HPP 22 #define REQUEST_MANAGER_HPP 26 #include <boost/asio.hpp> 27 #include <boost/thread/thread.hpp> 45 RequestManager(
const shared_ptr<Configuration>&
config,
const shared_ptr<Geodata>&
data,
const shared_ptr<Renderer>&
renderer,
const shared_ptr<Cache>&
cache,
const shared_ptr<StylesheetManager>&
ssm);
66 shared_ptr<StylesheetManager>
ssm;
71 std::vector< shared_ptr<boost::thread> >
workers;
73 std::queue<shared_ptr<RenderCanvasFactory>>
factories;
83 scoped_ptr<RunningQueue>
running;
shared_ptr< Geodata > data
TESTABLE shared_ptr< StylesheetManager > getStylesheetManager() const
Returns the StylesheetManager.
std::vector< shared_ptr< boost::thread > > workers
bool nextUserRequest()
Selects the next Job and runs it process Method.
boost::mutex factoriesMutex
void stop()
stops all jobs
The StylesheetManager provides an interface to get arbitrary Stylesheets from the stylesheet director...
void processNextRequest()
Selects the next Job and runs it process Method.
std::queue< shared_ptr< HttpRequest > > userRequests
TESTABLE void enqueue(const shared_ptr< HttpRequest > &r)
Enqueues the HttpRequest.
This file is part of alaCarte.
A TileIdentifier identifies a Tile.
std::queue< shared_ptr< RenderCanvasFactory > > factories
std::chrono::system_clock::time_point prerender_stop
RequestManager(const shared_ptr< Configuration > &config, const shared_ptr< Geodata > &data, const shared_ptr< Renderer > &renderer, const shared_ptr< Cache > &cache, const shared_ptr< StylesheetManager > &ssm)
Constructs a new RequestManager with the given parameters.
shared_ptr< Cache > cache
bool nextPreRenderRequest()
TESTABLE shared_ptr< Geodata > getGeodata() const
Returns the Geodata.
shared_ptr< Configuration > config
std::queue< shared_ptr< MetaIdentifier > > preRenderRequests
shared_ptr< Renderer > renderer
boost::asio::io_service::work preventStop
TESTABLE shared_ptr< Renderer > getRenderer() const
Returns the Renderer.
TESTABLE shared_ptr< Cache > getCache() const
Returns the Cache.
Represents a set of options accessible via strings.
boost::asio::io_service jobPool
std::chrono::system_clock::time_point prerender_start
shared_ptr< StylesheetManager > ssm
~RequestManager()
Stops the io_service, joins all Threads and destructs the RequestManager.
scoped_ptr< RunningQueue > running
unsigned int currentPrerenderingThreads