Page Speed Optimization Libraries
1.13.35.1
|
#include "simple_buffered_apache_fetch.h"
Public Member Functions | |
SimpleBufferedApacheFetch (const RequestContextPtr &request_context, RequestHeaders *request_headers, ThreadSystem *thread_system, request_rec *req, MessageHandler *handler) | |
void | Wait () LOCKS_EXCLUDED(mutex_) |
Blocks waiting for the fetch to complete. | |
bool | IsCachedResultValid (const ResponseHeaders &headers) override LOCKS_EXCLUDED(mutex_) |
Public Member Functions inherited from net_instaweb::AsyncFetch | |
AsyncFetch (const RequestContextPtr &request_ctx) | |
void | HeadersComplete () |
void | Done (bool success) |
virtual bool | Write (const StringPiece &content, MessageHandler *handler) |
virtual bool | Flush (MessageHandler *handler) |
RequestHeaders * | request_headers () |
void | set_request_headers (RequestHeaders *headers) |
void | SetRequestHeadersTakingOwnership (RequestHeaders *headers) |
Same as above, but takes ownership. | |
const RequestHeaders * | request_headers () const |
ResponseHeaders * | response_headers () |
See doc for request_headers and set_request_headers. | |
void | set_response_headers (ResponseHeaders *headers) |
ResponseHeaders * | extra_response_headers () |
void | set_extra_response_headers (ResponseHeaders *headers) |
virtual bool | IsBackgroundFetch () const |
virtual void | Reset () |
bool | headers_complete () const |
bool | content_length_known () const |
int64 | content_length () const |
void | set_content_length (int64 x) |
GoogleString | LoggingString () |
virtual const RequestContextPtr & | request_context () |
virtual AbstractLogRecord * | log_record () |
void | FixCacheControlForGoogleCache () |
Public Member Functions inherited from net_instaweb::Writer | |
virtual bool | Dump (Writer *writer, MessageHandler *message_handler) |
Protected Member Functions | |
void | HandleHeadersComplete () override LOCKS_EXCLUDED(mutex_) |
void | HandleDone (bool success) override LOCKS_EXCLUDED(mutex_) |
bool | HandleFlush (MessageHandler *handler) override LOCKS_EXCLUDED(mutex_) |
bool | HandleWrite (const StringPiece &sp, MessageHandler *handler) override LOCKS_EXCLUDED(mutex_) |
Additional Inherited Members | |
Static Public Member Functions inherited from net_instaweb::AsyncFetch | |
static bool | IsGoogleCacheVia (StringPiece via_value) |
Static Public Attributes inherited from net_instaweb::AsyncFetch | |
static const int | kContentLengthUnknown = -1 |
Links an apache request_rec* to an AsyncFetch, adding the ability to block based on a condition variable. Unlike ApacheFetch this always buffers and implements no policy, nor does it try to use Apache thread for any rewriting — a scheduler thread should be used along with this.
net_instaweb::SimpleBufferedApacheFetch::SimpleBufferedApacheFetch | ( | const RequestContextPtr & | request_context, |
RequestHeaders * | request_headers, | ||
ThreadSystem * | thread_system, | ||
request_rec * | req, | ||
MessageHandler * | handler | ||
) |
Takes ownership of request_headers. req is expected to survive at least until Wait() returns.
|
overridevirtual |
Is the cache entry corresponding to headers valid? Default is that it is valid. Sub-classes can provide specific implementations, e.g., based on cache invalidation timestamp in domain specific options. Used by CacheUrlAsyncFetcher.
Reimplemented from net_instaweb::AsyncFetch.