Data Structures | Defines | Typedefs | Functions | Variables

ClusterCache.cc File Reference

A brief file description. More...

#include "P_Cluster.h"
Include dependency graph for ClusterCache.cc:

Go to the source code of this file.

Data Structures

class  ClusterVConnectionCache
struct  ClusterVConnectionCache::Entry
class  ClusterVConnectionCacheEvent
struct  retryDisposeOfDataBuffer

Defines

#define CACHE_NO_RESPONSE   0
#define DOT_SEPARATED(_x)
#define ET_CACHE_CONT_SM   ET_NET
#define ALLOW_THREAD_STEAL   true

Typedefs

typedef int(retryDisposeOfDataBuffer::* rtryDisOfDBufHandler )(int, void *)

Functions

static CacheContinuationfind_cache_continuation (unsigned int, unsigned int)
static unsigned int new_cache_sequence_number ()
CacheOpMsg_longunmarshal_CacheOpMsg_long (void *data, int NeedByteSwap)
CacheOpMsg_shortunmarshal_CacheOpMsg_short (void *data, int NeedByteSwap)
CacheOpMsg_short_2unmarshal_CacheOpMsg_short_2 (void *data, int NeedByteSwap)
void init_from_long (CacheContinuation *cont, CacheOpMsg_long *msg, ClusterMachine *m)
void init_from_short (CacheContinuation *cont, CacheOpMsg_short *msg, ClusterMachine *m)
void init_from_short_2 (CacheContinuation *cont, CacheOpMsg_short_2 *msg, ClusterMachine *m)
void cache_op_ClusterFunction (ClusterHandler *ch, void *data, int len)
void cache_op_malloc_ClusterFunction (ClusterHandler *ch, void *data, int len)
void cache_op_result_ClusterFunction (ClusterHandler *ch, void *d, int l)
void cache_lookup_ClusterFunction (ClusterHandler *ch, void *data, int len)

Variables

int cache_migrate_on_demand = false
static ClassAllocator
< CacheContinuation
cacheContAllocator ("cacheContAllocator")
static Queue< CacheContinuationremoteCacheContQueue [REMOTE_CONNECT_HASH]
static Ptr< ProxyMutexremoteCacheContQueueMutex [REMOTE_CONNECT_HASH]
static int cluster_sequence_number = 1
static ink_hrtime cache_cluster_timeout = CACHE_CLUSTER_TIMEOUT
static ClassAllocator
< ClusterVConnectionCache::Entry
ClusterVCCacheEntryAlloc ("ClusterVConnectionCache::Entry")
ClusterVConnectionCacheGlobalOpenWriteVCcache = 0

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file ClusterCache.cc.


Define Documentation

#define ALLOW_THREAD_STEAL   true

Definition at line 86 of file ClusterCache.cc.

#define CACHE_NO_RESPONSE   0

Definition at line 65 of file ClusterCache.cc.

Referenced by CacheContinuation::do_op().

#define DOT_SEPARATED (   _x  ) 
#define ET_CACHE_CONT_SM   ET_NET

Typedef Documentation

typedef int(retryDisposeOfDataBuffer::* rtryDisOfDBufHandler)(int, void *)

Definition at line 1878 of file ClusterCache.cc.


Function Documentation

void cache_lookup_ClusterFunction ( ClusterHandler ch,
void *  data,
int  len 
)
void cache_op_ClusterFunction ( ClusterHandler ch,
void *  data,
int  len 
)

Definition at line 1063 of file ClusterCache.cc.

References a, ACTION_RESULT_DONE, CacheContinuation::allocMsgBuffer(), CacheOpMsg_long::buffer_size, CacheOpMsg_short::buffer_size, Alias32::byte, CacheContinuation::cache_action, CACHE_ALLOW_MULTIPLE_WRITES, CACHE_DEREF, CACHE_EVENT_OPEN_READ_FAILED, CACHE_EVENT_OPEN_WRITE_FAILED, CACHE_LINK, cache_op_ClusterFunction, 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, CacheContinuation::cacheContAllocator_alloc(), CacheLookupHttpConfigAllocator, caches, CFL_ALLOW_MULTIPLE_WRITES, CacheContinuation::cfl_flags, CFL_LOPENWRITE_HAVE_OLDINFO, CFL_OVERWRITE_ON_WRITE, CFL_REMOVE_LINK, CFL_REMOVE_USER_AGENTS, CacheContinuation::ch, CacheOpMsg_long::channel, CacheOpMsg_short::channel, ClusterVCToken::clear(), CLUSTER_CACHE_OUTSTANDING_STAT, CLUSTER_CHAN_INUSE_STAT, CLUSTER_DELAYED_OPEN, CLUSTER_INCREMENT_DYN_STAT, CLUSTER_OPT_CONN_READ, CLUSTER_OPT_CONN_WRITE, CLUSTER_OPT_IMMEDIATE, CacheContinuation::cluster_vc_channel, clusterProcessor, ClusterProcessor::connect_local(), ClusterVConnection::current_cont, Debug, Cache::deref(), DOT_SEPARATED, ECLUSTER_CHANNEL_INUSE, CacheContinuation::frag_type, CacheContinuation::getMsgBuffer(), ClusterMessageHeader::GetMsgVersion(), HTTP_WKSIDX_DELETE, HTTP_WKSIDX_PURGE, CacheContinuation::ic_arena, CacheContinuation::ic_hostname, CacheContinuation::ic_hostname_len, CacheContinuation::ic_old_info, CacheContinuation::ic_params, CacheContinuation::ic_request, init_from_long(), init_from_short(), init_from_short_2(), ink_assert, ink_get_hrtime(), ink_release_assert, iobuffer_size_to_index(), ClusterVCToken::ip_created, Cache::link(), ClusterHandler::machine, CacheOpMsg_short::md5, CacheOpMsg_short_2::md5_1, CacheOpMsg_short_2::md5_2, memcpy, CacheOpMsg_short_2::moi, CacheOpMsg_short::moi, Continuation::mutex, Thread::mutex, MUTEX_TRY_LOCK, ClusterMessageHeader::NeedByteSwap(), new_IOBufferData, new_ProxyMutex(), op_to_sizeof_fixedlen_msg(), Cache::open_read(), Cache::open_write(), ClusterVConnection::pending_remote_fill, CacheContinuation::pin_in_cache, CacheContinuation::read_cluster_vc, Cache::remove(), CacheContinuation::replyOpEvent(), CacheContinuation::request_opcode, CacheContinuation::request_purge, CacheOpMsg_short_2::seq_number, CacheOpMsg_long::seq_number, CacheOpMsg_short::seq_number, CacheContinuation::seq_number, ClusterVCToken::sequence_number, SET_CONTINUATION_HANDLER, CacheContinuation::setMsgBufferLen(), CacheContinuation::setupReadWriteVC(), CacheContinuation::setupVCdataRead(), CacheOpMsg_long::sizeof_fixedlen_msg(), CacheContinuation::start_time, this_ethread(), CacheOpMsg_long::token, CacheOpMsg_short::token, CacheContinuation::token, HTTPInfo::unmarshal(), CacheLookupHttpConfig::unmarshal(), unmarshal_CacheOpMsg_long(), unmarshal_CacheOpMsg_short(), unmarshal_CacheOpMsg_short_2(), CacheOpMsg_long::url_md5, and CacheContinuation::write_cluster_vc.

void cache_op_malloc_ClusterFunction ( ClusterHandler ch,
void *  data,
int  len 
)
void cache_op_result_ClusterFunction ( ClusterHandler ch,
void *  d,
int  l 
)

Definition at line 1976 of file ClusterCache.cc.

References ats_swap32(), CACHE_EVENT_DEREF_FAILED, CACHE_EVENT_LINK, CACHE_EVENT_LINK_FAILED, CACHE_EVENT_OPEN_READ, CACHE_EVENT_OPEN_READ_FAILED, CACHE_EVENT_OPEN_WRITE_FAILED, CACHE_EVENT_REMOVE_FAILED, CACHE_EVENT_RESPONSE_MSG, CACHE_EVENT_UPDATE_FAILED, cache_op_result_ClusterFunction, CACHE_RETRY_PERIOD, CacheContinuation::cacheContAllocator_alloc(), CLUSTER_INCREMENT_DYN_STAT, CLUSTER_REMOTE_OP_REPLY_TIMEOUTS_STAT, Debug, ET_CACHE_CONT_SM, event_is_open(), event_reply_may_have_moi(), eventProcessor, find_cache_continuation(), FOLDHASH, CacheContinuation::freeMsgBuffer(), ClusterMessageHeader::GetMsgVersion(), Continuation::handleEvent(), CacheContinuation::handleReplyEvent(), CacheContinuation::ic_new_info, ink_assert, ink_get_hrtime(), ink_release_assert, iobuffer_size_to_index(), ClusterMachine::ip, CacheOpReplyMsg::is_ram_cache_hit, ClusterHandler::machine, make_ptr(), memcpy, CacheOpReplyMsg::moi, Continuation::mutex, Thread::mutex, MUTEX_TAKE_TRY_LOCK, MUTEX_TRY_LOCK, MUTEX_UNTAKE_LOCK, ClusterMessageHeader::NeedByteSwap(), new_IOBufferData, new_ProxyMutex(), CacheContinuation::read_cluster_vc, CacheContinuation::result, CacheOpReplyMsg::result, CacheContinuation::result_error, EventProcessor::schedule_in(), CacheContinuation::seq_number, CacheOpReplyMsg::seq_number, SET_CONTINUATION_HANDLER, ClusterVConnection::set_ram_cache_hit(), CacheContinuation::setMsgBufferLen(), CacheOpReplyMsg::sizeof_fixedlen_msg(), CacheContinuation::start_time, CacheOpReplyMsg::SwapBytes(), CacheContinuation::target_ip, this_ethread(), CacheOpReplyMsg::token, CacheContinuation::token, Alias32::u32, and HTTPInfo::unmarshal().

static CacheContinuation * find_cache_continuation ( unsigned int  seq_number,
unsigned int  from_ip 
) [static]
void init_from_long ( CacheContinuation cont,
CacheOpMsg_long msg,
ClusterMachine m 
) [inline]
void init_from_short ( CacheContinuation cont,
CacheOpMsg_short msg,
ClusterMachine m 
) [inline]
void init_from_short_2 ( CacheContinuation cont,
CacheOpMsg_short_2 msg,
ClusterMachine m 
) [inline]
static unsigned int new_cache_sequence_number (  )  [static]
CacheOpMsg_long* unmarshal_CacheOpMsg_long ( void *  data,
int  NeedByteSwap 
) [inline]

Definition at line 973 of file ClusterCache.cc.

References CacheOpMsg_long::SwapBytes().

Referenced by cache_op_ClusterFunction().

CacheOpMsg_short* unmarshal_CacheOpMsg_short ( void *  data,
int  NeedByteSwap 
) [inline]

Definition at line 981 of file ClusterCache.cc.

References CacheOpMsg_short::SwapBytes().

Referenced by cache_op_ClusterFunction().

CacheOpMsg_short_2* unmarshal_CacheOpMsg_short_2 ( void *  data,
int  NeedByteSwap 
) [inline]

Definition at line 989 of file ClusterCache.cc.

References CacheOpMsg_short_2::SwapBytes().

Referenced by cache_op_ClusterFunction().


Variable Documentation

ink_hrtime cache_cluster_timeout = CACHE_CLUSTER_TIMEOUT [static]

Definition at line 54 of file ClusterCache.cc.

Referenced by CacheContinuation::do_remote_lookup().

ClassAllocator<CacheContinuation> cacheContAllocator("cacheContAllocator") [static]
int cluster_sequence_number = 1 [static]

Definition at line 66 of file ClusterCache.cc.

Referenced by new_cache_sequence_number().

ClassAllocator< ClusterVConnectionCache::Entry > ClusterVCCacheEntryAlloc("ClusterVConnectionCache::Entry") [static]

Definition at line 206 of file ClusterCache.cc.

Queue<CacheContinuation> remoteCacheContQueue[REMOTE_CONNECT_HASH] [static]

Definition at line 61 of file ClusterCache.cc.

Ptr<ProxyMutex> remoteCacheContQueueMutex[REMOTE_CONNECT_HASH] [static]

Definition at line 62 of file ClusterCache.cc.