#include <pagepool.h>
Inheritance diagram for ClientPage:


Public Member Functions | |
| ClientPage (const char *n, int s, double mt, double et, double a) | |
| virtual | ~ClientPage () |
| virtual WebPageType | type () const |
| virtual void | print_info (char *buf) |
| void | name (char *buf) |
| double & | mtime () |
| double & | etime () |
| double & | age () |
| HttpApp * | server () |
| void | validate (double mtime) |
| void | invalidate (double mtime) |
| int | is_valid () const |
| int | is_header_valid () const |
| void | set_valid_hdr () |
| void | set_uncacheable () |
| int | is_uncacheable () |
| void | set_unread () |
| void | set_read () |
| int | is_unread () |
| int | is_server_down () |
| void | server_down () |
| int & | counter () |
| int | count_inval (int a, int th) |
| int | count_request (int b, int th) |
| void | set_mpush (double time) |
| void | clear_mpush () |
| int | is_mpush () |
| double | mpush_time () |
| int | size () const |
| int & | id () |
Static Public Member Functions | |
| void | split_name (const char *name, PageID &id) |
| void | print_name (char *name, PageID &id) |
Static Public Attributes | |
| int | PUSHALL_ = 0 |
Protected Member Functions | |
| void | set_page_state (int state) |
| void | clear_page_state (int state) |
| void | set_page_action (int action) |
| void | clear_page_action (int action) |
Protected Attributes | |
| HttpApp * | server_ |
| double | age_ |
| double | mtime_ |
| double | etime_ |
| int | status_ |
| int | counter_ |
| double | mpushTime_ |
| int | size_ |
| int | id_ |
|
||||||||||||||||||||||||
|
Definition at line 53 of file pagepool.cc. References abort(), HTTP_VALID_PAGE, Page::id_, and server_.
00053 : 00054 Page(s), age_(a), mtime_(mt), etime_(et), 00055 status_(HTTP_VALID_PAGE), counter_(0), 00056 mpushTime_(0) 00057 { 00058 // Parse name to get server and page id 00059 char *buf = new char[strlen(n) + 1]; 00060 strcpy(buf, n); 00061 char *tmp = strtok(buf, ":"); 00062 server_ = (HttpApp*)TclObject::lookup(tmp); 00063 if (server_ == NULL) { 00064 fprintf(stderr, "Non-exitent server name for page %s", n); 00065 abort(); 00066 } 00067 tmp = strtok(NULL, ":"); 00068 id_ = atol(tmp); 00069 delete []buf; 00070 } |
Here is the call graph for this function:

|
|
Definition at line 100 of file pagepool.h.
00100 {}
|
|
|
Definition at line 108 of file pagepool.h. References age_. Referenced by HttpUpdateData::PageRec::copy(), ClientPagePool::get_age(), and print_info().
00108 { return age_; }
|
|
|
Definition at line 197 of file pagepool.h. References clear_page_action(), and HTTP_MANDATORY_PUSH. Referenced by HttpMInvalCache::command(), HttpYucInvalServer::command(), and HttpMInvalCache::recv_upd().
00197 { clear_page_action(HTTP_MANDATORY_PUSH); }
|
Here is the call graph for this function:

|
|
Definition at line 215 of file pagepool.h. References status_. Referenced by clear_mpush().
|
|
|
Definition at line 209 of file pagepool.h. References status_. Referenced by invalidate(), server_down(), set_read(), set_valid_hdr(), and validate().
|
|
||||||||||||
|
Definition at line 174 of file pagepool.h. References counter_, and PUSHALL_. Referenced by HttpYucInvalServer::command(), HttpMInvalCache::process_inv(), and HttpMInvalCache::recv_upd().
|
|
||||||||||||
|
Definition at line 184 of file pagepool.h. References counter_, and PUSHALL_. Referenced by HttpMInvalCache::command(), and HttpYucInvalServer::command().
|
|
|
Definition at line 170 of file pagepool.h. References counter_, and PUSHALL_. Referenced by ClientPagePool::add_page(), HttpMInvalCache::command(), HttpYucInvalServer::command(), HttpMInvalCache::process_inv(), and HttpMInvalCache::recv_upd().
|
|
|
Definition at line 107 of file pagepool.h. References etime_. Referenced by ClientPagePool::get_etime(), print_info(), and ClientPagePool::set_etime().
00107 { return etime_; }
|
|
|
Definition at line 38 of file pagepool.h. References Page::id_. Referenced by TracePagePool::add_page(), name(), and ServerPage::ServerPage().
00038 { return id_; }
|
|
|
Definition at line 120 of file pagepool.h. References clear_page_state(), HTTP_VALID_HEADER, HTTP_VALID_PAGE, and mtime_. Referenced by HttpMInvalCache::process_inv().
00120 {
00121 if (mtime_ >= mtime)
00122 return;
00123 clear_page_state(HTTP_VALID_PAGE);
00124 clear_page_state(HTTP_VALID_HEADER);
00125 mtime_ = mtime;
00126 }
|
Here is the call graph for this function:

|
|
Definition at line 130 of file pagepool.h. References HTTP_VALID_HEADER, HTTP_VALID_PAGE, and status_. Referenced by HttpPercInvalCache::command(), and HttpPercInvalCache::recv_inv_filter().
00130 {
00131 return ((status_ & HTTP_VALID_PAGE) ||
00132 (status_ & HTTP_VALID_HEADER));
00133 }
|
|
|
Definition at line 198 of file pagepool.h. References HTTP_MANDATORY_PUSH, and status_. Referenced by ClientPagePool::add_page(), HttpYucInvalServer::command(), and HttpMInvalCache::recv_upd().
00198 { return status_ & HTTP_MANDATORY_PUSH; }
|
|
|
Definition at line 158 of file pagepool.h. References HTTP_SERVER_DOWN, and status_.
00158 { return (status_ & HTTP_SERVER_DOWN); }
|
|
|
Definition at line 144 of file pagepool.h. References HTTP_UNCACHEABLE, and status_. Referenced by print_info().
00144 {
00145 return (status_ & HTTP_UNCACHEABLE);
00146 }
|
|
|
Definition at line 156 of file pagepool.h. References HTTP_UNREAD_PAGE, and status_. Referenced by HttpMInvalCache::command().
00156 { return (status_ & HTTP_UNREAD_PAGE); }
|
|
|
Definition at line 127 of file pagepool.h. References HTTP_VALID_PAGE, and status_. Referenced by HttpApp::command(), and HttpMInvalCache::recv_inv_filter().
00127 {
00128 return (status_ & HTTP_VALID_PAGE);
00129 }
|
|
|
Definition at line 199 of file pagepool.h. References mpushTime_. Referenced by ClientPagePool::add_page(), HttpYucInvalServer::command(), and HttpMInvalCache::recv_upd().
00199 { return mpushTime_; }
|
|
|
Definition at line 106 of file pagepool.h. References mtime_. Referenced by HttpUpdateData::PageRec::copy(), ClientPagePool::get_mtime(), print_info(), HttpMInvalCache::process_inv(), HttpPercInvalCache::recv_inv_filter(), HttpMInvalCache::recv_inv_filter(), HttpMInvalCache::recv_upd(), and ClientPagePool::set_mtime().
00106 { return mtime_; }
|
|
|
Definition at line 100 of file pagepool.cc. References Page::id(), and server_. Referenced by ClientPagePool::add_page(), MClientPagePool::cache_replace(), HttpUpdateData::PageRec::copy(), MediaPage::evict_tail_segment(), HitCountList::print(), MClientPagePool::repl_atomic(), and MClientPagePool::repl_finegrain().
|
Here is the call graph for this function:

|
|
Reimplemented in MediaPage. Definition at line 92 of file pagepool.cc. References age(), etime(), is_uncacheable(), mtime(), and Page::size(). Referenced by ClientPagePool::get_pageinfo(), and MediaPage::print_info().
00093 {
00094 sprintf(buf, "size %d modtime %.17g time %.17g age %.17g",
00095 size(), mtime(), etime(), age());
00096 if (is_uncacheable())
00097 strcat(buf, " noc 1");
00098 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 72 of file pagepool.cc. References PageID::id_, and PageID::s_.
|
|
|
Definition at line 109 of file pagepool.h. References server_. Referenced by ClientPagePool::invalidate_server(), and HttpMInvalCache::process_inv().
00109 { return server_; }
|
|
|
Definition at line 159 of file pagepool.h. References clear_page_state(), HTTP_SERVER_DOWN, HTTP_VALID_HEADER, HTTP_VALID_PAGE, and set_page_state(). Referenced by ClientPagePool::invalidate_server().
00159 {
00160 // Set page as invalid
00161 // Don't change mtime, only change page status
00162 clear_page_state(HTTP_VALID_PAGE);
00163 clear_page_state(HTTP_VALID_HEADER);
00164 set_page_state(HTTP_SERVER_DOWN);
00165 }
|
Here is the call graph for this function:

|
|
Definition at line 194 of file pagepool.h. References HTTP_MANDATORY_PUSH, mpushTime_, and set_page_action(). Referenced by ClientPagePool::add_page(), HttpMInvalCache::command(), and HttpYucInvalServer::command().
00194 {
00195 set_page_action(HTTP_MANDATORY_PUSH), mpushTime_ = time;
00196 }
|
Here is the call graph for this function:

|
|
Definition at line 212 of file pagepool.h. References status_. Referenced by set_mpush().
00212 {
00213 status_ |= action;
00214 }
|
|
|
Definition at line 206 of file pagepool.h. References status_. Referenced by server_down(), set_uncacheable(), set_unread(), set_valid_hdr(), and validate().
00206 {
00207 status_ |= state;
00208 }
|
|
|
Definition at line 153 of file pagepool.h. References clear_page_state(), and HTTP_UNREAD_PAGE. Referenced by HttpMInvalCache::command().
00153 {
00154 clear_page_state(HTTP_UNREAD_PAGE);
00155 }
|
Here is the call graph for this function:

|
|
Definition at line 141 of file pagepool.h. References HTTP_UNCACHEABLE, and set_page_state(). Referenced by ClientPagePool::enter_page(), and MClientPagePool::enter_page().
00141 {
00142 set_page_state(HTTP_UNCACHEABLE);
00143 }
|
Here is the call graph for this function:

|
|
Definition at line 150 of file pagepool.h. References HTTP_UNREAD_PAGE, and set_page_state(). Referenced by HttpMInvalCache::command(), and HttpMInvalCache::recv_upd().
00150 {
00151 set_page_state(HTTP_UNREAD_PAGE);
00152 }
|
Here is the call graph for this function:

|
|
Definition at line 134 of file pagepool.h. References clear_page_state(), HTTP_SERVER_DOWN, HTTP_VALID_HEADER, HTTP_VALID_PAGE, and set_page_state(). Referenced by ClientPagePool::enter_metadata().
00134 {
00135 // XXX page invalid, but only header valid
00136 clear_page_state(HTTP_SERVER_DOWN);
00137 clear_page_state(HTTP_VALID_PAGE);
00138 set_page_state(HTTP_VALID_HEADER);
00139 }
|
Here is the call graph for this function:

|
|
Definition at line 37 of file pagepool.h. References Page::size_. Referenced by HttpUpdateData::add(), HttpUpdateData::PageRec::copy(), MClientPagePool::fill_page(), MClientPagePool::force_remove(), ClientPagePool::get_size(), Page::Page(), print_info(), and MClientPagePool::remove_page().
00037 { return size_; }
|
|
||||||||||||
|
Definition at line 77 of file pagepool.cc. References abort(), PageID::id_, and PageID::s_. Referenced by ClientPagePool::add_page(), CompMathPagePool::command(), ClientPagePool::get_page(), MediaServer::get_piq(), and ClientPagePool::remove_page().
00078 {
00079 char *buf = new char[strlen(name)+1];
00080 strcpy(buf, name);
00081 char *tmp = strtok(buf, ":");
00082 id.s_ = (HttpApp*)TclObject::lookup(tmp);
00083 if (id.s_ == NULL) {
00084 fprintf(stderr, "Non-exitent server name for page %s\n", name);
00085 abort();
00086 }
00087 tmp = strtok(NULL, ":");
00088 id.id_ = atol(tmp);
00089 delete []buf;
00090 }
|
Here is the call graph for this function:

|
|
Implements Page. Reimplemented in MediaPage. Definition at line 102 of file pagepool.h. References HTML, and WebPageType. Referenced by MediaServer::command(), MediaCache::command(), HttpApp::command(), MClientPagePool::force_remove(), and MClientPagePool::remove_page().
00102 { return HTML; }
|
|
|
Definition at line 112 of file pagepool.h. References abort(), clear_page_state(), HTTP_SERVER_DOWN, HTTP_VALID_PAGE, mtime_, and set_page_state().
00112 {
00113 if (mtime_ >= mtime)
00114 abort(); // This shouldn't happen!
00115 // Clear server down bit
00116 clear_page_state(HTTP_SERVER_DOWN);
00117 set_page_state(HTTP_VALID_PAGE);
00118 mtime_ = mtime;
00119 }
|
Here is the call graph for this function:

|
|
Definition at line 220 of file pagepool.h. Referenced by age(). |
|
|
Definition at line 224 of file pagepool.h. Referenced by count_inval(), count_request(), and counter(). |
|
|
Definition at line 222 of file pagepool.h. Referenced by etime(). |
|
|
Definition at line 43 of file pagepool.h. Referenced by ClientPage(), Page::id(), and ServerPage::ServerPage(). |
|
|
Definition at line 225 of file pagepool.h. Referenced by mpush_time(), and set_mpush(). |
|
|
Definition at line 221 of file pagepool.h. Referenced by invalidate(), mtime(), and validate(). |
|
|
Definition at line 43 of file pagepool.cc. Referenced by PagePool::command(), count_inval(), count_request(), and counter(). |
|
|
Definition at line 219 of file pagepool.h. Referenced by ClientPage(), name(), and server(). |
|
|
Definition at line 42 of file pagepool.h. Referenced by MediaPage::create(), MediaPage::hit_layer(), Page::Page(), ServerPage::size(), and Page::size(). |
|
|
Definition at line 223 of file pagepool.h. Referenced by clear_page_action(), clear_page_state(), is_header_valid(), is_mpush(), is_server_down(), is_uncacheable(), is_unread(), is_valid(), set_page_action(), and set_page_state(). |
1.3.3