#include <HttpCacheSM.h>
Inherits Continuation.
Public Member Functions | |
HttpCacheSM () | |
void | init (HttpSM *sm_arg, ProxyMutex *amutex) |
Action * | open_read (URL *url, HTTPHdr *hdr, CacheLookupHttpConfig *params, time_t pin_in_cache) |
Action * | open_write (URL *url, HTTPHdr *request, CacheHTTPInfo *old_info, time_t pin_in_cache, bool retry, bool allow_multiple) |
void | set_readwhilewrite_inprogress (bool value) |
bool | is_readwhilewrite_inprogress () |
void | abort_read () |
void | abort_write () |
void | close_write () |
void | close_read () |
void | end_both () |
URL * | get_lookup_url () |
void | set_lookup_url (URL *url) |
Data Fields | |
CacheVConnection * | cache_read_vc |
CacheVConnection * | cache_write_vc |
bool | read_locked |
bool | write_locked |
bool | readwhilewrite_inprogress |
HttpSM * | master_sm |
Action * | pending_action |
Definition at line 58 of file HttpCacheSM.h.
HttpCacheSM::HttpCacheSM | ( | ) |
Definition at line 64 of file HttpCacheSM.cc.
void HttpCacheSM::abort_read | ( | ) | [inline] |
Definition at line 98 of file HttpCacheSM.h.
References VIO::ABORT, cache_read_vc, VConnection::do_io(), http_current_cache_connections_stat, and HTTP_DECREMENT_DYN_STAT.
void HttpCacheSM::abort_write | ( | ) | [inline] |
Definition at line 106 of file HttpCacheSM.h.
References VIO::ABORT, cache_write_vc, VConnection::do_io(), http_current_cache_connections_stat, and HTTP_DECREMENT_DYN_STAT.
Referenced by end_both(), and HttpSM::perform_cache_write_action().
void HttpCacheSM::close_read | ( | ) | [inline] |
Definition at line 122 of file HttpCacheSM.h.
References cache_read_vc, VIO::CLOSE, VConnection::do_io(), http_current_cache_connections_stat, and HTTP_DECREMENT_DYN_STAT.
Referenced by end_both(), HttpSM::handle_api_return(), HttpSM::perform_cache_write_action(), HttpSM::perform_transform_cache_write_action(), HttpSM::set_next_state(), and HttpSM::state_api_callout().
void HttpCacheSM::close_write | ( | ) | [inline] |
Definition at line 114 of file HttpCacheSM.h.
References cache_write_vc, VIO::CLOSE, VConnection::do_io(), http_current_cache_connections_stat, and HTTP_DECREMENT_DYN_STAT.
Referenced by HttpSM::issue_cache_update(), and HttpSM::perform_cache_write_action().
void HttpCacheSM::end_both | ( | ) | [inline] |
Definition at line 130 of file HttpCacheSM.h.
References abort_write(), and close_read().
Referenced by HttpSM::kill_this(), HttpSM::perform_cache_write_action(), HttpSM::perform_transform_cache_write_action(), and HttpSM::set_next_state().
URL* HttpCacheSM::get_lookup_url | ( | ) | [inline] |
Definition at line 137 of file HttpCacheSM.h.
Referenced by HttpSM::add_cache_sm().
void HttpCacheSM::init | ( | HttpSM * | sm_arg, | |
ProxyMutex * | amutex | |||
) | [inline] |
Definition at line 63 of file HttpCacheSM.h.
References HttpCacheAction::init(), master_sm, and Continuation::mutex.
Referenced by HttpSM::add_cache_sm(), and HttpSM::start_sub_sm().
bool HttpCacheSM::is_readwhilewrite_inprogress | ( | ) | [inline] |
Definition at line 93 of file HttpCacheSM.h.
References readwhilewrite_inprogress.
Referenced by HttpTransact::calculate_document_freshness_limit().
Action * HttpCacheSM::open_read | ( | URL * | url, | |
HTTPHdr * | hdr, | |||
CacheLookupHttpConfig * | params, | |||
time_t | pin_in_cache | |||
) |
Definition at line 234 of file HttpCacheSM.cc.
References ink_assert, pending_action, and SET_HANDLER.
Referenced by HttpSM::do_cache_lookup_and_read().
Action * HttpCacheSM::open_write | ( | URL * | url, | |
HTTPHdr * | request, | |||
CacheHTTPInfo * | old_info, | |||
time_t | pin_in_cache, | |||
bool | retry, | |||
bool | allow_multiple | |||
) |
Definition at line 271 of file HttpCacheSM.cc.
References ACTION_RESULT_DONE, CACHE_ALLOW_MULTIPLE_WRITES, HttpTransact::State::cache_control, CACHE_EVENT_OPEN_WRITE_FAILED, cache_write_vc, cacheProcessor, CacheControlResult::cluster_cache_local, ECACHE_DOC_BUSY, Continuation::handleEvent(), HttpTransact::State::http_config_param, ink_assert, master_sm, HttpConfigParams::max_cache_open_write_retries, CacheProcessor::open_write(), pending_action, HttpSM::redirection_tries, SET_HANDLER, and HttpSM::t_state.
Referenced by HttpSM::do_cache_prepare_action().
void HttpCacheSM::set_lookup_url | ( | URL * | url | ) | [inline] |
Definition at line 141 of file HttpCacheSM.h.
Referenced by HttpSM::add_cache_sm().
void HttpCacheSM::set_readwhilewrite_inprogress | ( | bool | value | ) | [inline] |
Definition at line 87 of file HttpCacheSM.h.
References readwhilewrite_inprogress.
Definition at line 75 of file HttpCacheSM.h.
Referenced by abort_read(), HttpSM::add_cache_sm(), close_read(), HttpSM::do_range_setup_if_necessary(), HttpSM::setup_cache_read_transfer(), HttpSM::setup_cache_transfer_to_transform(), HttpSM::state_cache_open_read(), and HttpSM::state_cache_open_write().
Definition at line 76 of file HttpCacheSM.h.
Referenced by abort_write(), close_write(), HttpSM::do_cache_prepare_action(), HttpSM::do_cache_prepare_update(), HttpSM::do_cache_prepare_write_transform(), HttpSM::handle_api_return(), HttpTransact::handle_forward_server_connection_open(), HttpSM::issue_cache_update(), open_write(), HttpSM::perform_cache_write_action(), HttpSM::set_next_state(), HttpSM::setup_cache_write_transfer(), and HttpSM::tunnel_handler_cache_fill().
Definition at line 83 of file HttpCacheSM.h.
Referenced by HttpCacheAction::cancel(), init(), and open_write().
Definition at line 84 of file HttpCacheSM.h.
Referenced by HttpCacheAction::cancel(), open_read(), and open_write().
Definition at line 78 of file HttpCacheSM.h.
Referenced by HttpSM::add_cache_sm().
Definition at line 81 of file HttpCacheSM.h.
Referenced by is_readwhilewrite_inprogress(), and set_readwhilewrite_inprogress().
Definition at line 79 of file HttpCacheSM.h.