blob: a67b1ae820f07917f856f1e9f6cc32da2e9d5f5c [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"/>
<title>activemq-cpp-3.4.0: decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">activemq-cpp-3.4.0</div>
</td>
</tr>
</tbody>
</table>
</div>
<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>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<h1>decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy" --><!-- doxytag: inherits="decaf::util::concurrent::RejectedExecutionHandler" -->
<p>Handler policy for tasks that are rejected upon a call to <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html#a0419ccc4de7327c1a04dc465b79b712a" title="Executes the given command at some time in the future.">ThreadPoolExecutor::execute</a> this class will attempt to run the task in the Thread that called the execute method unless the executor is shutdown in which case the task is not run and is destroyed.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_thread_pool_executor_8h_source.html">src/main/decaf/util/concurrent/ThreadPoolExecutor.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy:</div>
<div class="dyncontent">
<div class="center"><img src="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy__inherit__graph.png" border="0" usemap="#decaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_inherit__map" alt="Inheritance graph"/></div>
<map name="decaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_inherit__map" id="decaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_inherit__map">
<area shape="rect" id="node2" href="classdecaf_1_1util_1_1concurrent_1_1_rejected_execution_handler.html" title="A handler for tasks that cannot be executed by a ThreadPoolExecutor." alt="" coords="43,5,408,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_1_1_discard_oldest_policy.html">DiscardOldestPolicy</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handler policy for tasks that are rejected upon a call to <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html#a0419ccc4de7327c1a04dc465b79b712a" title="Executes the given command at some time in the future.">ThreadPoolExecutor::execute</a> this class always destroys the oldest unexecuted task in the <a class="el" href="classdecaf_1_1util_1_1_queue.html" title="A kind of collection provides advanced operations than other basic collections, such as insertion...">Queue</a> and then attempts to execute the rejected task using the passed in executor. <a href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_1_1_discard_oldest_policy.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_1_1_discard_policy.html">DiscardPolicy</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handler policy for tasks that are rejected upon a call to <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html#a0419ccc4de7327c1a04dc465b79b712a" title="Executes the given command at some time in the future.">ThreadPoolExecutor::execute</a> this class always destroys the rejected task and returns quietly. <a href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy_1_1_discard_policy.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy.html#a69a047fa13ca211ab345e301b6eb3c77">CallerRunsPolicy</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy.html#a7ac0626e5ba0d8a06be8fdd40c7c5143">~CallerRunsPolicy</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy.html#a40f5e1b2d2424c24d5eb79db6332f5d2">rejectedExecution</a> (<a class="el" href="classdecaf_1_1lang_1_1_runnable.html">decaf::lang::Runnable</a> *task, <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html">ThreadPoolExecutor</a> *executer DECAF_UNUSED)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Handler policy for tasks that are rejected upon a call to <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html#a0419ccc4de7327c1a04dc465b79b712a" title="Executes the given command at some time in the future.">ThreadPoolExecutor::execute</a> this class will attempt to run the task in the Thread that called the execute method unless the executor is shutdown in which case the task is not run and is destroyed. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0 </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a69a047fa13ca211ab345e301b6eb3c77"></a><!-- doxytag: member="decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy::CallerRunsPolicy" ref="a69a047fa13ca211ab345e301b6eb3c77" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy::CallerRunsPolicy </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a7ac0626e5ba0d8a06be8fdd40c7c5143"></a><!-- doxytag: member="decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy::~CallerRunsPolicy" ref="a7ac0626e5ba0d8a06be8fdd40c7c5143" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy::~CallerRunsPolicy </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a40f5e1b2d2424c24d5eb79db6332f5d2"></a><!-- doxytag: member="decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy::rejectedExecution" ref="a40f5e1b2d2424c24d5eb79db6332f5d2" args="(decaf::lang::Runnable *task, ThreadPoolExecutor *executer DECAF_UNUSED)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void decaf::util::concurrent::ThreadPoolExecutor::CallerRunsPolicy::rejectedExecution </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classdecaf_1_1lang_1_1_runnable.html">decaf::lang::Runnable</a> *&#160;</td>
<td class="paramname"><em>task</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html">ThreadPoolExecutor</a> *executer&#160;</td>
<td class="paramname"><em>DECAF_UNUSED</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>References <a class="el" href="classdecaf_1_1lang_1_1_runnable.html#a261b4f8200eb7bcfe8bc6bc2ee3e26fe">decaf::lang::Runnable::run()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/main/decaf/util/concurrent/<a class="el" href="_thread_pool_executor_8h_source.html">ThreadPoolExecutor.h</a></li>
</ul>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacedecaf.html">decaf</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1util.html">util</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1util_1_1concurrent.html">concurrent</a> </li>
<li class="navelem"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor.html">ThreadPoolExecutor</a> </li>
<li class="navelem"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_thread_pool_executor_1_1_caller_runs_policy.html">CallerRunsPolicy</a> </li>
<li class="footer">Generated on Mon Apr 25 2011 for activemq-cpp-3.4.0 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
</body>
</html>