| <html> |
| <head> |
| <title> |
| log4cxx - Documentation |
| </title> |
| <link href="../css/doxygen.css" rel="stylesheet" type="text/css"/> |
| </head> |
| |
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> |
| <!-- START Header table --> |
| <table border="0" cellspacing="0" width="90%"> |
| <!-- TOP IMAGE --> |
| <tr> |
| <td colspan="2"> |
| <a href="http://logging.apache.org"> |
| <img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/> |
| </a> |
| </td> |
| |
| </tr> |
| </table> |
| <!-- END Header table --> |
| |
| <!-- START main table --> |
| <table id="main" border="0" width="90%" cellspacing="2" cellpadding="0"> |
| <tr><td colspan="2"> |
| <hr noshade="" size="1"/> |
| </td></tr> |
| |
| <tr> |
| <!-- LEFT SIDE NAVIGATION --> |
| <td id="navbar" valign="top"> |
| <!-- ============================================================ --> |
| <table id="navbar" border="0" cellspacing="0" cellpadding="0"> |
| <tr > |
| <td class="navbarHeader" nowrap="true"> |
| <strong>Apache</strong> |
| </td> |
| </tr> |
| <tr><td class="navbarItem"><small> <a href="http://www.apache.org">Apache Home</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="http://logging.apache.org/">Logging Services</a> |
| </small></td></tr> |
| <tr > |
| <td class="navbarHeader" nowrap="true"> |
| <strong>log4cxx project</strong> |
| </td> |
| </tr> |
| <tr><td class="navbarItem"><small> <a href="../index.html">About</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../news.html">News</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../team.html">Team</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../manual/index.html">Documentation</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../performance.html">Performance</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../download.html">Download</a> |
| </small></td></tr> |
| </table> |
| |
| </td> |
| <td id="mainContents" align="left" valign="top"> |
| <hr> |
| <!-- Generated by Doxygen 1.3.5 --> |
| <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
| <h1>Thread Class Reference</h1>Inheritance diagram for Thread:<p><center><img src="classlog4cxx_1_1helpers_1_1Thread__inherit__graph.png" border="0" usemap="#Thread__inherit__map" alt="Inheritance graph"></center> |
| <map name="Thread__inherit__map"> |
| <area href="classlog4cxx_1_1helpers_1_1FileWatchdog.html" shape="rect" coords="6,242,97,266" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="14,93,89,117" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="26,19,77,43" alt=""> |
| </map> |
| <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Thread:<p><center><img src="classlog4cxx_1_1helpers_1_1Thread__coll__graph.png" border="0" usemap="#Thread__coll__map" alt="Collaboration graph"></center> |
| <map name="Thread__coll__map"> |
| <area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="6,96,81,120" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="18,19,69,43" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="105,96,177,120" alt=""> |
| </map> |
| <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1helpers_1_1Thread-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> |
| <tr><td></td></tr> |
| <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> |
| <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#a0">Thread</a> ()</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#a1">Thread</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">RunnablePtr</a> <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#p0">runnable</a>)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#a3">start</a> ()</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#a4">run</a> ()</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#a5">join</a> ()</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#a6">setPriority</a> (int newPriority)</td></tr> |
| |
| <tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> |
| <tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#e0">getCurrentThreadId</a> ()</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#e1">sleep</a> (long millis)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>long </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#e2">InterlockedIncrement</a> (volatile long *val)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>long </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#e3">InterlockedDecrement</a> (volatile long *val)</td></tr> |
| |
| <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> |
| <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">RunnablePtr</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#p0">runnable</a></td></tr> |
| |
| </table> |
| <hr><a name="_details"></a><h2>Detailed Description</h2> |
| A thread is a thread of execution in a program. |
| <p> |
| <hr><h2>Constructor & Destructor Documentation</h2> |
| <a class="anchor" name="a0" doxytag="log4cxx::helpers::Thread::Thread" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html">Thread</a> </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Allocates a new <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html">Thread</a> object. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a1" doxytag="log4cxx::helpers::Thread::Thread" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html">Thread</a> </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">RunnablePtr</a> </td> |
| <td class="mdname1" valign="top" nowrap> <em>runnable</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Allocates a new <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html">Thread</a> object. </td> |
| </tr> |
| </table> |
| <hr><h2>Member Function Documentation</h2> |
| <a class="anchor" name="e0" doxytag="log4cxx::helpers::Thread::getCurrentThreadId" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> unsigned long getCurrentThreadId </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [static]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Returns the current thread identifier </td> |
| </tr> |
| </table> |
| <a class="anchor" name="e3" doxytag="log4cxx::helpers::Thread::InterlockedDecrement" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> long InterlockedDecrement </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">volatile long * </td> |
| <td class="mdname1" valign="top" nowrap> <em>val</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [static]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Atomic decrement </td> |
| </tr> |
| </table> |
| <a class="anchor" name="e2" doxytag="log4cxx::helpers::Thread::InterlockedIncrement" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> long InterlockedIncrement </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">volatile long * </td> |
| <td class="mdname1" valign="top" nowrap> <em>val</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [static]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Atomic increment </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a5" doxytag="log4cxx::helpers::Thread::join" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void join </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Waits for this thread to die. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a4" doxytag="log4cxx::helpers::Thread::run" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void run </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| If this thread was constructed using a separate <a class="el" href="classlog4cxx_1_1helpers_1_1Runnable.html">Runnable</a> run object, then that <a class="el" href="classlog4cxx_1_1helpers_1_1Runnable.html">Runnable</a> object's run method is called; otherwise, this method does nothing and returns. |
| <p> |
| Reimplemented in <a class="el" href="classlog4cxx_1_1helpers_1_1FileWatchdog.html#a1">FileWatchdog</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a6" doxytag="log4cxx::helpers::Thread::setPriority" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void setPriority </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">int </td> |
| <td class="mdname1" valign="top" nowrap> <em>newPriority</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Changes the priority of this thread. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="e1" doxytag="log4cxx::helpers::Thread::sleep" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void sleep </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">long </td> |
| <td class="mdname1" valign="top" nowrap> <em>millis</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [static]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a3" doxytag="log4cxx::helpers::Thread::start" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void start </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Causes this thread to begin execution; calls the run method of this thread. |
| <p> |
| Reimplemented in <a class="el" href="classlog4cxx_1_1helpers_1_1FileWatchdog.html#a2">FileWatchdog</a>. </td> |
| </tr> |
| </table> |
| <hr><h2>Member Data Documentation</h2> |
| <a class="anchor" name="p0" doxytag="log4cxx::helpers::Thread::runnable" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">RunnablePtr</a> <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html#p0">runnable</a><code> [protected]</code> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| <a class="el" href="classlog4cxx_1_1helpers_1_1Thread.html">Thread</a> descriptor </td> |
| </tr> |
| </table> |
| <hr>The documentation for this class was generated from the following files:<ul> |
| <li>thread.h<li>thread.cpp</ul> |
| |
| </td> |
| </tr> |
| |
| <!-- FOOTER --> |
| <tr><td colspan="2"> |
| <hr noshade="" size="1"/> |
| </td></tr> |
| <tr><td colspan="2"> |
| <div align="center"><font color="#525D76" size="-1"><em> |
| Copyright © 1999-2004, Apache Software Foundation |
| </em></font></div> |
| </td></tr> |
| </table> |
| <!-- END main table --> |
| </body> |
| </html> |
| <!-- end the processing --> |