Public Types | Public Member Functions | Static Public Member Functions | Data Fields

CacheContinuation Struct Reference

#include <P_ClusterCacheInternal.h>

Inherits Continuation.

Collaboration diagram for CacheContinuation:
Collaboration graph
[legend]

Public Types

enum  { MagicNo = 0x92183123 }

Public Member Functions

int lookupEvent (int event, void *d)
int probeLookupEvent (int event, void *d)
int remoteOpEvent (int event, Event *e)
int replyLookupEvent (int event, void *d)
int replyOpEvent (int event, VConnection *vc)
int handleReplyEvent (int event, Event *e)
int callbackEvent (int event, Event *e)
int setupVCdataRead (int event, VConnection *vc)
int VCdataRead (int event, VIO *target_vio)
int setupReadWriteVC (int, VConnection *)
ClusterVConnectionlookupOpenWriteVC ()
int lookupOpenWriteVCEvent (int, Event *)
int localVCsetupEvent (int event, ClusterVConnection *vc)
void insert_cache_callback_user (ClusterVConnection *, int, void *)
int insertCallbackEvent (int, Event *)
void callback_user (int result, void *d)
void defer_callback_result (int result, void *d)
int callbackResultEvent (int event, Event *e)
void setupReadBufTunnel (VConnection *, VConnection *)
int tunnelClosedEvent (int event, void *)
int remove_and_delete (int, Event *)
void setMsgBufferLen (int l, IOBufferData *b=0)
int getMsgBufferLen ()
void allocMsgBuffer ()
char * getMsgBuffer ()
IOBufferDatagetMsgBufferIOBData ()
void freeMsgBuffer ()
void free ()
 CacheContinuation ()

Static Public Member Functions

static bool is_ClusterThread (EThread *et)
static int init ()
static CacheContinuationcacheContAllocator_alloc ()
static void cacheContAllocator_free (CacheContinuation *)
static inkcoreapi Actioncallback_failure (Action *, int, int, CacheContinuation *this_cc=0)
static Actiondo_remote_lookup (Continuation *, CacheKey *, CacheContinuation *, CacheFragType, char *, int)
static inkcoreapi Actiondo_op (Continuation *, ClusterMachine *, void *, int, char *, int, int nbytes=-1, MIOBuffer *b=0)
static int setup_local_vc (char *data, int data_len, CacheContinuation *cc, ClusterMachine *mp, Action **)
static void disposeOfDataBuffer (void *buf)
static int handleDisposeEvent (int event, CacheContinuation *cc)
static int32_t getObjectSize (VConnection *, int, CacheHTTPInfo *)

Data Fields

int magicno
void * callback_data
void * callback_data_2
INK_MD5 url_md5
Eventtimeout
Action action
ClusterMachinetarget_machine
int probe_depth
ClusterMachinepast_probes [CONFIGURATION_HISTORY_PROBE_DEPTH]
ink_hrtime start_time
ClusterMachinefrom
ClusterHandlerch
VConnectioncache_vc
bool cache_read
int result
int result_error
ClusterVCToken token
unsigned int seq_number
uint16_t cfl_flags
CacheFragType frag_type
int nbytes
unsigned int target_ip
int request_opcode
bool request_purge
bool local_lookup_only
bool no_reply_message
bool request_timeout
bool expect_cache_callback
bool use_deferred_callback
time_t pin_in_cache
Ptr< IOBufferDatarw_buf_msg
int rw_buf_msg_len
ClusterVConnectionread_cluster_vc
ClusterVConnectionwrite_cluster_vc
int cluster_vc_channel
ClusterVCToken open_local_token
int caller_buf_freebytes
VIOreadahead_vio
IOBufferReaderreadahead_reader
Ptr< IOBufferBlockreadahead_data
bool have_all_data
CacheHTTPInfo cache_vc_info
OneWayTunneltunnel
Ptr< ProxyMutextunnel_mutex
CacheContinuationtunnel_cont
bool tunnel_closed
Actioncache_action
Eventlookup_open_write_vc_event
Arena ic_arena
CacheHTTPHdr ic_request
CacheHTTPHdr ic_response
CacheLookupHttpConfigic_params
CacheHTTPInfo ic_old_info
CacheHTTPInfo ic_new_info
Ptr< IOBufferDataic_hostname
int ic_hostname_len
int cache_op_ClusterFunction

Detailed Description

Definition at line 90 of file P_ClusterCacheInternal.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MagicNo 

Definition at line 92 of file P_ClusterCacheInternal.h.


Constructor & Destructor Documentation

CacheContinuation::CacheContinuation (  )  [inline]

Definition at line 274 of file P_ClusterCacheInternal.h.

References ClusterVCToken::clear(), remoteOpEvent(), SET_HANDLER, and token.


Member Function Documentation

void CacheContinuation::allocMsgBuffer (  )  [inline]
CacheContinuation * CacheContinuation::cacheContAllocator_alloc (  )  [static]
void CacheContinuation::cacheContAllocator_free ( CacheContinuation c  )  [static]
Action * CacheContinuation::callback_failure ( Action a,
int  result,
int  err,
CacheContinuation this_cc = 0 
) [static]
void CacheContinuation::callback_user ( int  result,
void *  d 
)
int CacheContinuation::callbackEvent ( int  event,
Event e 
)
int CacheContinuation::callbackResultEvent ( int  event,
Event e 
)
void CacheContinuation::defer_callback_result ( int  result,
void *  d 
)
void CacheContinuation::disposeOfDataBuffer ( void *  buf  )  [static]
Action * CacheContinuation::do_op ( Continuation c,
ClusterMachine mp,
void *  args,
int  user_opcode,
char *  data,
int  data_len,
int  nbytes = -1,
MIOBuffer b = 0 
) [static]

Definition at line 375 of file ClusterCache.cc.

References action, ALLOCA_DOUBLE, CacheOpMsg_long::buffer_size, CacheOpMsg_short::buffer_size, cache_cluster_timeout, CACHE_DEREF, CACHE_LINK, CACHE_NO_RESPONSE, CACHE_OP_CLUSTER_FUNCTION, CACHE_OP_MALLOCED_CLUSTER_FUNCTION, CACHE_OPEN_READ, CACHE_OPEN_READ_BUFFER, CACHE_OPEN_READ_BUFFER_LONG, CACHE_OPEN_READ_LONG, CACHE_OPEN_WRITE, CACHE_OPEN_WRITE_BUFFER, CACHE_OPEN_WRITE_BUFFER_LONG, CACHE_OPEN_WRITE_LONG, CACHE_REMOVE, CACHE_RETRY_PERIOD, CACHE_UPDATE, cacheContAllocator_alloc(), Action::cancelled, CacheOpMsg_short_2::cfl_flags, CacheOpMsg_long::cfl_flags, CacheOpMsg_short::cfl_flags, ch, clusterProcessor, CacheOpMsg_long::data, CacheOpMsg_short::data, Debug, Queue< C, L >::enqueue(), ET_CACHE_CONT_SM, eventProcessor, FOLDHASH, CacheOpMsg_short_2::frag_type, frag_type, CacheOpMsg_long::frag_type, CacheOpMsg_short::frag_type, from, CacheOpMsg_short_2::init(), CacheOpMsg_long::init(), CacheOpMsg_short::init(), ink_get_hrtime(), ink_release_assert, ClusterProcessor::invoke_remote(), ClusterMachine::ip, CacheOpMsg_short::md5, CacheOpMsg_short_2::md5_1, CacheOpMsg_short_2::md5_2, Continuation::mutex, MUTEX_RELEASE, MUTEX_TRY_LOCK, CacheOpMsg_long::nbytes, CacheOpMsg_short::nbytes, new_cache_sequence_number(), op_failure(), op_needs_marshalled_coi(), op_to_sizeof_fixedlen_msg(), CacheOpMsg_short_2::opcode, CacheOpMsg_long::opcode, CacheOpMsg_short::opcode, pin_in_cache, ClusterMachine::pop_ClusterHandler(), remoteOpEvent(), remove_and_delete(), request_opcode, result, EventProcessor::schedule_in(), CacheOpMsg_short_2::seq_number, CacheOpMsg_long::seq_number, CacheOpMsg_short::seq_number, seq_number, SET_CONTINUATION_HANDLER, setup_local_vc(), start_time, target_ip, target_machine, this_ethread(), timeout, CacheOpMsg_long::url_md5, and url_md5.

Referenced by Cluster_deref(), Cluster_link(), Cluster_read(), Cluster_remove(), and Cluster_write().

Action * CacheContinuation::do_remote_lookup ( Continuation cont,
CacheKey key,
CacheContinuation c,
CacheFragType  ft,
char *  hostname,
int  hostname_len 
) [static]
void CacheContinuation::free (  )  [inline]
void CacheContinuation::freeMsgBuffer (  )  [inline]
char* CacheContinuation::getMsgBuffer (  )  [inline]
IOBufferData* CacheContinuation::getMsgBufferIOBData (  )  [inline]

Definition at line 229 of file P_ClusterCacheInternal.h.

References rw_buf_msg.

Referenced by handleReplyEvent(), and remoteOpEvent().

int CacheContinuation::getMsgBufferLen (  )  [inline]

Definition at line 207 of file P_ClusterCacheInternal.h.

References rw_buf_msg_len.

Referenced by handleReplyEvent(), localVCsetupEvent(), and remoteOpEvent().

int32_t CacheContinuation::getObjectSize ( VConnection vc,
int  opcode,
CacheHTTPInfo ret_ci 
) [static]
int CacheContinuation::handleDisposeEvent ( int  event,
CacheContinuation cc 
) [static]
int CacheContinuation::handleReplyEvent ( int  event,
Event e 
)
int CacheContinuation::init (  )  [static]

Definition at line 359 of file ClusterCache.cc.

References ClusterVConnectionCache::init(), and new_ProxyMutex().

Referenced by CacheProcessor::cacheInitialized().

void CacheContinuation::insert_cache_callback_user ( ClusterVConnection vc,
int  res,
void *  e 
)
int CacheContinuation::insertCallbackEvent ( int  ,
Event  
)
static bool CacheContinuation::is_ClusterThread ( EThread et  )  [inline, static]
int CacheContinuation::localVCsetupEvent ( int  event,
ClusterVConnection vc 
)

Definition at line 822 of file ClusterCache.cc.

References action, cache_cluster_timeout, CACHE_EVENT_OPEN_READ_FAILED, CACHE_EVENT_OPEN_WRITE_FAILED, CACHE_OP_CLUSTER_FUNCTION, CACHE_OP_MALLOCED_CLUSTER_FUNCTION, CACHE_RETRY_PERIOD, cacheContAllocator_free(), Action::cancel(), Action::cancelled, ch, CacheOpMsg_long::channel, CacheOpMsg_short::channel, ClusterVConnection::channel, VIO::CLOSE, CLUSTER_EVENT_OPEN, CLUSTER_EVENT_OPEN_EXISTS, CLUSTER_INCREMENT_DYN_STAT, CLUSTER_OPEN_DELAY_TIME_STAT, CLUSTER_REMOTE_OP_TIMEOUTS_STAT, CLUSTER_SUM_DYN_STAT, cluster_vc_channel, clusterProcessor, Action::continuation, ClusterVConnection::current_cont, Debug, VConnection::do_io(), Queue< C, L >::enqueue(), Event::ethread, EVENT_INTERVAL, FOLDHASH, freeMsgBuffer(), getMsgBuffer(), getMsgBufferLen(), Continuation::handleEvent(), ink_assert, ink_get_hrtime(), ClusterProcessor::invoke_remote(), ClusterVCToken::ip_created, LOG_EVENT_TIME, MagicNo, magicno, MUTEX_RELEASE, MUTEX_TRY_LOCK, op_is_read(), op_is_shortform(), op_needs_marshalled_coi(), open_local_token, ClusterVConnection::pending_remote_fill, read_cluster_vc, ClusterVConnection::remote_closed, remoteOpEvent(), Queue< C, L >::remove(), remove_and_delete(), request_opcode, result, result_error, Event::schedule_in(), CacheOpMsg_long::seq_number, CacheOpMsg_short::seq_number, seq_number, ClusterVCToken::sequence_number, SET_HANDLER, start_time, target_ip, timeout, CacheOpMsg_long::token, CacheOpMsg_short::token, use_deferred_callback, and write_cluster_vc.

Referenced by lookupOpenWriteVC(), lookupOpenWriteVCEvent(), and setup_local_vc().

int CacheContinuation::lookupEvent ( int  event,
void *  d 
)

Definition at line 2492 of file ClusterCache.cc.

References ink_release_assert.

ClusterVConnection * CacheContinuation::lookupOpenWriteVC (  ) 
int CacheContinuation::lookupOpenWriteVCEvent ( int  event,
Event e 
)
int CacheContinuation::probeLookupEvent ( int  event,
void *  d 
)

Definition at line 2480 of file ClusterCache.cc.

References callback_user(), ink_assert, MagicNo, and magicno.

Referenced by remoteOpEvent().

int CacheContinuation::remoteOpEvent ( int  event,
Event e 
)

Definition at line 2190 of file ClusterCache.cc.

References VIO::ABORT, action, ClusterVConnectionBase::action_, ClusterVConnection::allow_remote_close(), ClusterVConnection::alternate, cache_cluster_timeout, CACHE_EVENT_LOOKUP, CACHE_EVENT_LOOKUP_FAILED, CACHE_EVENT_OPEN_WRITE, CACHE_EVENT_RESPONSE, CACHE_EVENT_RESPONSE_MSG, CACHE_EVENT_RESPONSE_RETRY, cache_hash(), CACHE_OPEN_READ_LONG, CACHE_RETRY_PERIOD, cacheContAllocator_free(), caches, callback_user(), Action::cancel(), Action::cancelled, VIO::CLOSE, CLUSTER_CACHE_LKRMT_CALLBACK_TIME_STAT, CLUSTER_CACHE_RMT_CALLBACK_TIME_STAT, CLUSTER_INCREMENT_DYN_STAT, cluster_machine_at_depth(), CLUSTER_OPT_CONN_WRITE, CLUSTER_REMOTE_OP_TIMEOUTS_STAT, CLUSTER_SUM_DYN_STAT, Action::continuation, ClusterMachine::dead, Debug, VConnection::do_io(), DOT_SEPARATED, ECLUSTER_OP_TIMEOUT, Queue< C, L >::enqueue(), Event::ethread, EVENT_INTERVAL, event_is_open(), find_cache_continuation(), FOLDHASH, frag_type, getMsgBuffer(), getMsgBufferIOBData(), getMsgBufferLen(), Continuation::handleEvent(), ClusterVConnection::have_all_data, have_all_data, ic_new_info, ink_assert, ink_get_hrtime(), ink_release_assert, ClusterVConnectionCache::insert(), insert_cache_callback_user(), ClusterVCToken::is_clear(), LOG_EVENT_TIME, Cache::lookup(), MagicNo, magicno, ClusterVConnection::marshal_buf, MUTEX_RELEASE, MUTEX_TRY_LOCK, MUTEX_UNTAKE_LOCK, Note, ClusterVConnection::pending_remote_fill, PROBE_LOCAL_CACHE_FIRST, PROBE_LOCAL_CACHE_LAST, probeLookupEvent(), read_cluster_vc, ClusterVConnection::remote_closed, Queue< C, L >::remove(), request_opcode, request_timeout, CacheOpReplyMsg::result, result, result_error, Event::schedule_in(), seq_number, SET_HANDLER, ClusterVConnection::set_type(), start_time, target_ip, target_machine, this_ethread(), timeout, CacheOpReplyMsg::token, token, url_md5, and write_cluster_vc.

Referenced by CacheContinuation(), do_op(), do_remote_lookup(), localVCsetupEvent(), and setup_local_vc().

int CacheContinuation::remove_and_delete ( int  ,
Event e 
)
int CacheContinuation::replyLookupEvent ( int  event,
void *  d 
)
int CacheContinuation::replyOpEvent ( int  event,
VConnection vc 
)

Definition at line 1645 of file ClusterCache.cc.

References ALLOCA_DOUBLE, ClusterVConnection::allow_remote_close(), bytes_IOBufferBlockList(), CACHE_EVENT_OPEN_WRITE, CACHE_LINK, CacheOpReplyMsg::CACHE_OP_REPLY_MESSAGE_VERSION, CACHE_OP_RESULT_CLUSTER_FUNCTION, CACHE_OPEN_READ_LONG, cache_read, cache_vc, cache_vc_info, cacheContAllocator_free(), ch, ClusterVCToken::clear(), VIO::CLOSE, CLUSTER_CACHE_CALLBACK_TIME_STAT, CLUSTER_CACHE_OUTSTANDING_STAT, CLUSTER_DECREMENT_DYN_STAT, CLUSTER_OPT_STEAL, CLUSTER_SUM_DYN_STAT, cluster_vc_channel, clusterProcessor, Debug, DEFAULT_MAX_BUFFER_SIZE, disposeOfDataBuffer(), VConnection::do_io(), event_is_open(), expect_cache_callback, from, getObjectSize(), have_all_data, OneWayTunnel::init(), ink_assert, ink_get_hrtime(), ink_release_assert, ClusterProcessor::invoke_remote(), ClusterProcessor::invoke_remote_data(), CacheOpReplyMsg::is_ram_cache_hit, LOG_EVENT_TIME, MagicNo, magicno, CacheOpReplyMsg::moi, ClusterMachine::msg_proto_major, Continuation::mutex, nbytes, no_reply_message, OneWayTunnel::OneWayTunnel_alloc(), op_is_read(), ClusterVConnection::pending_remote_fill, CacheOpReplyMsg::protoToVersion(), read_cluster_vc, readahead_data, readahead_vio, ClusterVConnection::remote_closed, request_opcode, CacheOpReplyMsg::result, result, seq_number, CacheOpReplyMsg::seq_number, setupReadBufTunnel(), CacheOpReplyMsg::sizeof_fixedlen_msg(), start_time, token, CacheOpReplyMsg::token, ClusterVConnection::type, Alias32::u32, and write_cluster_vc.

Referenced by cache_op_ClusterFunction(), setupReadWriteVC(), setupVCdataRead(), and VCdataRead().

void CacheContinuation::setMsgBufferLen ( int  l,
IOBufferData b = 0 
) [inline]
int CacheContinuation::setup_local_vc ( char *  data,
int  data_len,
CacheContinuation cc,
ClusterMachine mp,
Action **  act 
) [static]
void CacheContinuation::setupReadBufTunnel ( VConnection cache_read_vc,
VConnection cluster_write_vc 
)
int CacheContinuation::setupReadWriteVC ( int  event,
VConnection vc 
)
int CacheContinuation::setupVCdataRead ( int  event,
VConnection vc 
)
int CacheContinuation::tunnelClosedEvent ( int  event,
void *  c 
)
int CacheContinuation::VCdataRead ( int  event,
VIO target_vio 
)

Field Documentation

Definition at line 159 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and setupReadWriteVC().

Definition at line 174 of file P_ClusterCacheInternal.h.

Definition at line 109 of file P_ClusterCacheInternal.h.

Referenced by replyOpEvent().

Definition at line 108 of file P_ClusterCacheInternal.h.

Referenced by disposeOfDataBuffer(), and replyOpEvent().

Definition at line 154 of file P_ClusterCacheInternal.h.

Referenced by free(), replyOpEvent(), and VCdataRead().

Definition at line 98 of file P_ClusterCacheInternal.h.

Referenced by insert_cache_callback_user(), and insertCallbackEvent().

Definition at line 124 of file P_ClusterCacheInternal.h.

Referenced by replyOpEvent().

Definition at line 164 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and free().

Definition at line 170 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), free(), and setupReadWriteVC().

Definition at line 171 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and setupReadWriteVC().

Definition at line 168 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and free().

Definition at line 167 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and free().

Definition at line 165 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and free().

Definition at line 166 of file P_ClusterCacheInternal.h.

Referenced by free().

Definition at line 120 of file P_ClusterCacheInternal.h.

Definition at line 160 of file P_ClusterCacheInternal.h.

Referenced by lookupOpenWriteVC(), and lookupOpenWriteVCEvent().

Definition at line 116 of file P_ClusterCacheInternal.h.

Referenced by init_from_long(), init_from_short(), and replyOpEvent().

Definition at line 143 of file P_ClusterCacheInternal.h.

Referenced by localVCsetupEvent(), lookupOpenWriteVC(), and setup_local_vc().

ClusterMachine* CacheContinuation::past_probes[CONFIGURATION_HISTORY_PROBE_DEPTH]

Definition at line 104 of file P_ClusterCacheInternal.h.

Referenced by do_remote_lookup().

Definition at line 103 of file P_ClusterCacheInternal.h.

Referenced by do_remote_lookup().

Definition at line 150 of file P_ClusterCacheInternal.h.

Referenced by setupReadBufTunnel(), setupVCdataRead(), and VCdataRead().

Definition at line 119 of file P_ClusterCacheInternal.h.

Referenced by cache_op_ClusterFunction(), and setupReadWriteVC().

Definition at line 122 of file P_ClusterCacheInternal.h.

Referenced by remoteOpEvent().

Definition at line 102 of file P_ClusterCacheInternal.h.

Referenced by do_op(), and remoteOpEvent().

Definition at line 127 of file P_ClusterCacheInternal.h.

Referenced by localVCsetupEvent(), and remove_and_delete().


The documentation for this struct was generated from the following files: