Page Speed Optimization Libraries
1.7.30.3
|
Creates an Apache RewriteDriver. More...
#include "apache_rewrite_driver_factory.h"
Public Member Functions | |
ApacheRewriteDriverFactory (server_rec *server, const StringPiece &version) | |
ApacheMessageHandler * | apache_message_handler () |
virtual void | ChildInit () |
virtual void | NonStaticInitStats (Statistics *statistics) |
ApacheServerContext * | MakeApacheServerContext (server_rec *server) |
void | set_num_rewrite_threads (int x) |
int | num_rewrite_threads () const |
void | set_num_expensive_rewrite_threads (int x) |
int | num_expensive_rewrite_threads () const |
virtual bool | use_per_vhost_statistics () const |
void | set_use_per_vhost_statistics (bool x) |
virtual bool | enable_property_cache () const |
Hook so implementations may disable the property cache. | |
void | set_enable_property_cache (bool x) |
bool | inherit_vhost_config () const |
If true, virtual hosts should inherit global configuration. | |
void | set_inherit_vhost_config (bool x) |
bool | install_crash_handler () const |
void | set_install_crash_handler (bool x) |
virtual bool | UseBeaconResultsInFilters () const |
bool | PoolDestroyed (ApacheServerContext *rm) |
virtual ApacheConfig * | NewRewriteOptions () |
virtual ApacheConfig * | NewRewriteOptionsForQuery () |
ModSpdyFetchController * | mod_spdy_fetch_controller () |
virtual void | set_message_buffer_size (int x) |
Needed by mod_instaweb.cc:ParseDirective(). | |
virtual int | requests_per_host () |
Override requests_per_host to take num_rewrite_threads_ into account. | |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
static void | Initialize () |
Initializes static variables. Initialize/Terminate calls must be paired. | |
static void | Terminate () |
Static Public Attributes | |
static const char | kStaticAssetPrefix [] |
Protected Member Functions | |
virtual MessageHandler * | DefaultHtmlParseMessageHandler () |
Provide defaults. | |
virtual MessageHandler * | DefaultMessageHandler () |
virtual Timer * | DefaultTimer () |
virtual void | SetupCaches (ServerContext *server_context) |
virtual QueuedWorkerPool * | CreateWorkerPool (WorkerPoolCategory pool, StringPiece name) |
virtual bool | ShouldWriteResourcesToFileSystem () |
virtual void | ParentOrChildInit () |
virtual void | SetupMessageHandlers () |
virtual void | ShutDownMessageHandlers () |
virtual void | ShutDownFetchers () |
virtual void | SetCircularBuffer (SharedCircularBuffer *buffer) |
virtual void | InitStaticAssetManager (StaticAssetManager *static_asset_manager) |
Initializes the StaticAssetManager. |
Creates an Apache RewriteDriver.
Give access to apache_message_handler_ for the cases we need to use ApacheMessageHandler rather than MessageHandler. e.g. Use ApacheMessageHandler::Dump() This is a better choice than cast from MessageHandler.
virtual QueuedWorkerPool* net_instaweb::ApacheRewriteDriverFactory::CreateWorkerPool | ( | WorkerPoolCategory | pool, |
StringPiece | name | ||
) | [protected, virtual] |
Subclasses can override this to create an appropriately-sized thread pool for their environment. The default implementation will always make one with a single thread.
Reimplemented from net_instaweb::RewriteDriverFactory.
static void net_instaweb::ApacheRewriteDriverFactory::InitStats | ( | Statistics * | statistics | ) | [static] |
Initializes all the statistics objects created transitively by ApacheRewriteDriverFactory, including apache-specific and platform-independent statistics.
Reimplemented from net_instaweb::SystemRewriteDriverFactory.
virtual ApacheConfig* net_instaweb::ApacheRewriteDriverFactory::NewRewriteOptions | ( | ) | [virtual] |
Creates a new empty RewriteOptions object, with no default settings. Generally configurations go factory's default_options() -> ServerContext::global_options() -> RewriteDriverFactory, but this method just provides a blank set of options.
Reimplemented from net_instaweb::RewriteDriverFactory.
virtual ApacheConfig* net_instaweb::ApacheRewriteDriverFactory::NewRewriteOptionsForQuery | ( | ) | [virtual] |
As above, but set a name on the ApacheConfig noting that it came from a query.
Reimplemented from net_instaweb::RewriteDriverFactory.
virtual void net_instaweb::ApacheRewriteDriverFactory::NonStaticInitStats | ( | Statistics * | statistics | ) | [inline, virtual] |
Hook for subclasses to init their stats and call SystemRewriteDriverFactory::InitStats().
Implements net_instaweb::SystemRewriteDriverFactory.
virtual void net_instaweb::ApacheRewriteDriverFactory::ParentOrChildInit | ( | ) | [protected, virtual] |
This helper method contains init procedures invoked by both RootInit() and ChildInit()
Reimplemented from net_instaweb::SystemRewriteDriverFactory.
Notification of apache tearing down a context (vhost or top-level) corresponding to given ApacheServerContext. Returns true if it was the last context.
virtual void net_instaweb::ApacheRewriteDriverFactory::SetupCaches | ( | ServerContext * | server_context | ) | [protected, virtual] |
Called from InitServerContext, but virtualized separately as it is platform-specific. This method must call on the server context: set_http_cache, set_metadata_cache, set_filesystem_metadata_cache, and MakePropertyCaches.
Reimplemented from net_instaweb::SystemRewriteDriverFactory.
virtual void net_instaweb::ApacheRewriteDriverFactory::SetupMessageHandlers | ( | ) | [protected, virtual] |
Reimplemented from net_instaweb::SystemRewriteDriverFactory.
virtual bool net_instaweb::ApacheRewriteDriverFactory::ShouldWriteResourcesToFileSystem | ( | ) | [inline, protected, virtual] |
Disable the Resource Manager's filesystem since we have a write-through http_cache.
virtual void net_instaweb::ApacheRewriteDriverFactory::ShutDownFetchers | ( | ) | [protected, virtual] |
Can be overridden by subclasses to shutdown any fetchers we don't know about.
Reimplemented from net_instaweb::SystemRewriteDriverFactory.
virtual bool net_instaweb::ApacheRewriteDriverFactory::use_per_vhost_statistics | ( | ) | const [inline, virtual] |
By default statistics are collected separately for each virtual host. Allow implementations to indicate that they don't support this.
Reimplemented from net_instaweb::SystemRewriteDriverFactory.
virtual bool net_instaweb::ApacheRewriteDriverFactory::UseBeaconResultsInFilters | ( | ) | const [inline, virtual] |
mod_pagespeed uses a beacon handler to collect data for critical images, css, etc., so filters should be configured accordingly.
Implements net_instaweb::RewriteDriverFactory.
const char net_instaweb::ApacheRewriteDriverFactory::kStaticAssetPrefix[] [static] |
Path prefix where we serve static assets (primarily images and js resources) needed by some filters.