blob: 82bfa33cded78d78b59c60cbfdcd7fdeae30c4c8 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Impala: impala::ClientCacheHelper::PerHostCache Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Impala
</div>
<div id="projectbrief">Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structimpala_1_1ClientCacheHelper_1_1PerHostCache.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structimpala_1_1ClientCacheHelper_1_1PerHostCache-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">impala::ClientCacheHelper::PerHostCache Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for impala::ClientCacheHelper::PerHostCache:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="structimpala_1_1ClientCacheHelper_1_1PerHostCache__coll__graph.svg" width="216" height="246"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af7a7d77f629823f29e9718e762d92ad4"><td class="memItemLeft" align="right" valign="top">boost::mutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html#af7a7d77f629823f29e9718e762d92ad4">lock</a></td></tr>
<tr class="memdesc:af7a7d77f629823f29e9718e762d92ad4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Protects clients. <a href="#af7a7d77f629823f29e9718e762d92ad4">More...</a><br/></td></tr>
<tr class="separator:af7a7d77f629823f29e9718e762d92ad4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcf91f5299862d703e29fc232198306d"><td class="memItemLeft" align="right" valign="top">std::list&lt; <a class="el" href="namespaceimpala.html#af882a84ad40478dc121a6bf6dc27f201">ClientKey</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html#adcf91f5299862d703e29fc232198306d">clients</a></td></tr>
<tr class="memdesc:adcf91f5299862d703e29fc232198306d"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of client keys for this entry's host. <a href="#adcf91f5299862d703e29fc232198306d">More...</a><br/></td></tr>
<tr class="separator:adcf91f5299862d703e29fc232198306d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>There are three lock categories - the cache-wide lock (cache_lock_), the locks for a specific cache (<a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html#af7a7d77f629823f29e9718e762d92ad4" title="Protects clients. ">PerHostCache::lock</a>) and the lock for the set of all clients (client_map_lock_). They do not have to be taken concurrently (and should not be, in general), but if they are they must be taken in this order: cache_lock_-&gt;<a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html#af7a7d77f629823f29e9718e762d92ad4" title="Protects clients. ">PerHostCache::lock</a>-&gt;client_map_lock_. A <a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a> is a list of available client keys for a single host, plus a lock that protects that list. Only one <a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a> will ever be created for a given host, so when a <a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a> is retrieved from the PerHostCacheMap containing it there is no need to hold on to the container's lock. Only clients that are not currently in use are tracked in their host's <a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a>. When a client is returned to the cache via <a class="el" href="classimpala_1_1ClientCacheHelper.html#a952813bed7ba0ad4d5ac212d6b412855">ReleaseClient()</a>, it is reinserted into its corresponding <a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a> list. Clients returned by <a class="el" href="classimpala_1_1ClientCacheHelper.html#a866e9a0ba17a9812cb2ceafbbef183d4" title="If there is an error creating the new client, *client_key will be NULL. ">GetClient()</a> are considered to be immediately in use, and so don't exist in their <a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a> until they are released for the first time. </p>
<p>Definition at line <a class="el" href="client-cache_8h_source.html#l00131">131</a> of file <a class="el" href="client-cache_8h_source.html">client-cache.h</a>.</p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="adcf91f5299862d703e29fc232198306d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::list&lt;<a class="el" href="namespaceimpala.html#af882a84ad40478dc121a6bf6dc27f201">ClientKey</a>&gt; impala::ClientCacheHelper::PerHostCache::clients</td>
</tr>
</table>
</div><div class="memdoc">
<p>List of client keys for this entry's host. </p>
<p>Definition at line <a class="el" href="client-cache_8h_source.html#l00136">136</a> of file <a class="el" href="client-cache_8h_source.html">client-cache.h</a>.</p>
<p>Referenced by <a class="el" href="client-cache_8cc_source.html#l00148">impala::ClientCacheHelper::CloseConnections()</a>.</p>
</div>
</div>
<a class="anchor" id="af7a7d77f629823f29e9718e762d92ad4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">boost::mutex impala::ClientCacheHelper::PerHostCache::lock</td>
</tr>
</table>
</div><div class="memdoc">
<p>Protects clients. </p>
<p>Definition at line <a class="el" href="client-cache_8h_source.html#l00133">133</a> of file <a class="el" href="client-cache_8h_source.html">client-cache.h</a>.</p>
<p>Referenced by <a class="el" href="client-cache_8cc_source.html#l00148">impala::ClientCacheHelper::CloseConnections()</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>be/src/runtime/<a class="el" href="client-cache_8h_source.html">client-cache.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespaceimpala.html">impala</a></li><li class="navelem"><a class="el" href="classimpala_1_1ClientCacheHelper.html">ClientCacheHelper</a></li><li class="navelem"><a class="el" href="structimpala_1_1ClientCacheHelper_1_1PerHostCache.html">PerHostCache</a></li>
<li class="footer">Generated on Thu May 7 2015 16:10:49 for Impala by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>