Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > d4089b27bfd3289c6baf8b0975a53f9e > files > 12

poco-doc-1.3.6p1-1.fc13.i686.rpm

<!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>
<title>Class Poco::AbstractCache</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="template">template &lt; class TKey, class TValue, class TStrategy &gt;</h1>
<h1 class="symbol">class AbstractCache</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Cache<br />
<b>Header:</b> Poco/AbstractCache.h</p>
<h2>Description</h2>
<div class="description">
<p>An <a href="Poco.AbstractCache.html" title="class Poco::AbstractCache">AbstractCache</a> is the interface of all caches.  </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.AbstractCache.html#3202" title="Poco::AbstractCache::add()">add</a>, <a href="Poco.AbstractCache.html#3214" title="Poco::AbstractCache::clear()">clear</a>, <a href="Poco.AbstractCache.html#3222" title="Poco::AbstractCache::doAdd()">doAdd</a>, <a href="Poco.AbstractCache.html#3234" title="Poco::AbstractCache::doClear()">doClear</a>, <a href="Poco.AbstractCache.html#3232" title="Poco::AbstractCache::doGet()">doGet</a>, <a href="Poco.AbstractCache.html#3230" title="Poco::AbstractCache::doHas()">doHas</a>, <a href="Poco.AbstractCache.html#3228" title="Poco::AbstractCache::doRemove()">doRemove</a>, <a href="Poco.AbstractCache.html#3235" title="Poco::AbstractCache::doReplace()">doReplace</a>, <a href="Poco.AbstractCache.html#3216" title="Poco::AbstractCache::forceReplace()">forceReplace</a>, <a href="Poco.AbstractCache.html#3212" title="Poco::AbstractCache::get()">get</a>, <a href="Poco.AbstractCache.html#3217" title="Poco::AbstractCache::getAllKeys()">getAllKeys</a>, <a href="Poco.AbstractCache.html#3210" title="Poco::AbstractCache::has()">has</a>, <a href="Poco.AbstractCache.html#3220" title="Poco::AbstractCache::initialize()">initialize</a>, <a href="Poco.AbstractCache.html#3208" title="Poco::AbstractCache::remove()">remove</a>, <a href="Poco.AbstractCache.html#3215" title="Poco::AbstractCache::size()">size</a>, <a href="Poco.AbstractCache.html#3221" title="Poco::AbstractCache::uninitialize()">uninitialize</a></p>
<h2>Types</h2>
<h3><a name="3196">ConstIterator</a></h3>
<p class="decl">typedef typename DataHolder::const_iterator <a href="Poco.AbstractCache.html#3196" title="Poco::AbstractCache::ConstIterator">ConstIterator</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3194">DataHolder</a></h3>
<p class="decl">typedef std::map &lt; TKey, <a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> &lt; TValue &gt; &gt; <a href="Poco.AbstractCache.html#3194" title="Poco::AbstractCache::DataHolder">DataHolder</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3195">Iterator</a></h3>
<p class="decl">typedef typename DataHolder::iterator <a href="Poco.AbstractCache.html#3195" title="Poco::AbstractCache::Iterator">Iterator</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3197">KeySet</a></h3>
<p class="decl">typedef std::set &lt; TKey &gt; <a href="Poco.AbstractCache.html#3197" title="Poco::AbstractCache::KeySet">KeySet</a>;</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="3198">AbstractCache</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AbstractCache.html" title="class Poco::AbstractCache">AbstractCache</a>();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3199">AbstractCache</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.AbstractCache.html" title="class Poco::AbstractCache">AbstractCache</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TStrategy &amp; strat<br />);</p>
<div class="description">
<p></p>
</div>
<h2>Destructor</h2>
<h3><a name="3201">~AbstractCache</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.AbstractCache.html" title="class Poco::AbstractCache">AbstractCache</a>();</p>
<div class="description">
<p></p>
</div>
<h2>Member Functions</h2>
<h3><a name="3202">add</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void add(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key,<br />&nbsp;&nbsp;&nbsp;&nbsp;const TValue &amp; val<br />);</p>
<div class="description">
<p>Adds the key value pair to the cache. If for the key already an entry exists, it will be overwritten. </p>
</div>
<h3><a name="3205">add</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void add(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> &lt; TValue &gt; val<br />);</p>
<div class="description">
<p>Adds the key value pair to the cache. Note that adding a NULL <a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> will fail! If for the key already an entry exists, it will be overwritten. </p>
</div>
<h3><a name="3214">clear</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void clear();</p>
<div class="description">
<p>Removes all elements from the cache. </p>
</div>
<h3><a name="3216">forceReplace</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void forceReplace();</p>
<div class="description">
<p>Forces cache replacement. Note that <a href="Poco.html" title="namespace Poco">Poco</a>'s cache strategy use for efficiency reason no background thread which periodically triggers cache replacement. Cache Replacement is only started when the cache is modified from outside, i.e. add is called, or when a user tries to access an cache element via get. In some cases, i.e. expire based caching where for a long time no access to the cache happens, it might be desirable to be able to trigger cache replacement manually. </p>
</div>
<h3><a name="3212">get</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> &lt; TValue &gt; get(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key<br />);</p>
<div class="description">
<p>Returns a <a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> of the value. The SharedPointer will remain valid even when cache replacement removes the element. If for the key no value exists, an empty <a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> is returned. </p>
</div>
<h3><a name="3217">getAllKeys</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::set &lt; TKey &gt; getAllKeys();</p>
<div class="description">
<p>Returns a copy of all keys stored in the cache </p>
</div>
<h3><a name="3210">has</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool has(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key<br />) const;</p>
<div class="description">
<p>Returns true if the cache contains a value for the key. </p>
</div>
<h3><a name="3208">remove</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void remove(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key<br />);</p>
<div class="description">
<p>Removes an entry from the cache. If the entry is not found, the remove is ignored. </p>
</div>
<h3><a name="3215">size</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::size_t size();</p>
<div class="description">
<p>Returns the number of cached elements </p>
</div>
<h3><a name="3222">doAdd</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void doAdd(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key,<br />&nbsp;&nbsp;&nbsp;&nbsp;const TValue &amp; val<br />);</p>
<div class="description">
<p>Adds the key value pair to the cache. If for the key already an entry exists, it will be overwritten. </p>
</div>
<h3><a name="3225">doAdd</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void doAdd(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> &lt; TValue &gt; &amp; val<br />);</p>
<div class="description">
<p>Adds the key value pair to the cache. If for the key already an entry exists, it will be overwritten. </p>
</div>
<h3><a name="3234">doClear</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void doClear();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3232">doGet</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> &lt; TValue &gt; doGet(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key<br />);</p>
<div class="description">
<p>Returns a <a href="Poco.SharedPtr.html" title="class Poco::SharedPtr">SharedPtr</a> of the cache entry, returns 0 if for the key no value was found </p>
</div>
<h3><a name="3230">doHas</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool doHas(<br />&nbsp;&nbsp;&nbsp;&nbsp;const TKey &amp; key<br />) const;</p>
<div class="description">
<p>Returns true if the cache contains a value for the key </p>
</div>
<h3><a name="3228">doRemove</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void doRemove(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.AbstractCache.html#3195" title="Poco::AbstractCache::Iterator">Iterator</a> it<br />);</p>
<div class="description">
<p>Removes an entry from the cache. If the entry is not found the remove is ignored. </p>
</div>
<h3><a name="3235">doReplace</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void doReplace();</p>
<div class="description">
<p></p>
</div>
<h3><a name="3220">initialize</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void initialize();</p>
<div class="description">
<p>Sets up event registration. </p>
</div>
<h3><a name="3221">uninitialize</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void uninitialize();</p>
<div class="description">
<p>Reverts event registration. </p>
</div>
<h2>Variables</h2>
<h3><a name="3190">Add</a></h3>
<p class="decl"><a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">FIFOEvent</a> &lt; const <a href="Poco.KeyValueArgs.html" title="class Poco::KeyValueArgs">KeyValueArgs</a> &lt; TKey, TValue &gt; &gt; <a href="Poco.AbstractCache.html#3190" title="Poco::AbstractCache::Add">Add</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3193">Clear</a></h3>
<p class="decl"><a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">FIFOEvent</a> &lt; const <a href="Poco.EventArgs.html" title="class Poco::EventArgs">EventArgs</a> &gt; <a href="Poco.AbstractCache.html#3193" title="Poco::AbstractCache::Clear">Clear</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3192">Get</a></h3>
<p class="decl"><a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">FIFOEvent</a> &lt; const TKey &gt; <a href="Poco.AbstractCache.html#3192" title="Poco::AbstractCache::Get">Get</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3191">Remove</a></h3>
<p class="decl"><a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">FIFOEvent</a> &lt; const TKey &gt; <a href="Poco.AbstractCache.html#3191" title="Poco::AbstractCache::Remove">Remove</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3218">IsValid</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">mutable <a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">FIFOEvent</a> &lt; <a href="Poco.ValidArgs.html" title="class Poco::ValidArgs">ValidArgs</a> &lt; TKey &gt; &gt; <a href="Poco.AbstractCache.html#3218" title="Poco::AbstractCache::IsValid">IsValid</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3219">Replace</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">mutable <a href="Poco.FIFOEvent.html" title="class Poco::FIFOEvent">FIFOEvent</a> &lt; <a href="Poco.AbstractCache.html#3197" title="Poco::AbstractCache::KeySet">KeySet</a> &gt; <a href="Poco.AbstractCache.html#3219" title="Poco::AbstractCache::Replace">Replace</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3237">_data</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">mutable <a href="Poco.AbstractCache.html#3194" title="Poco::AbstractCache::DataHolder">DataHolder</a> _data;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3238">_mutex</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">mutable <a href="Poco.FastMutex.html" title="class Poco::FastMutex">FastMutex</a> _mutex;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3236">_strategy</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">TStrategy _strategy;</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>