FileCleaningTracker.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title>FileCleaningTracker (Apache Commons IO 2.6 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="FileCleaningTracker (Apache Commons IO 2.6 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="class-use/FileCleaningTracker.html">Use</a></li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  46. <li><a href="../../../../index-all.html">Index</a></li>
  47. <li><a href="../../../../help-doc.html">Help</a></li>
  48. </ul>
  49. </div>
  50. <div class="subNav">
  51. <ul class="navList">
  52. <li><a href="../../../../org/apache/commons/io/FileCleaner.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  53. <li><a href="../../../../org/apache/commons/io/FileDeleteStrategy.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  54. </ul>
  55. <ul class="navList">
  56. <li><a href="../../../../index.html?org/apache/commons/io/FileCleaningTracker.html" target="_top">Frames</a></li>
  57. <li><a href="FileCleaningTracker.html" target="_top">No&nbsp;Frames</a></li>
  58. </ul>
  59. <ul class="navList" id="allclasses_navbar_top">
  60. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  61. </ul>
  62. <div>
  63. <script type="text/javascript"><!--
  64. allClassesLink = document.getElementById("allclasses_navbar_top");
  65. if(window==top) {
  66. allClassesLink.style.display = "block";
  67. }
  68. else {
  69. allClassesLink.style.display = "none";
  70. }
  71. //-->
  72. </script>
  73. </div>
  74. <div>
  75. <ul class="subNavList">
  76. <li>Summary:&nbsp;</li>
  77. <li>Nested&nbsp;|&nbsp;</li>
  78. <li>Field&nbsp;|&nbsp;</li>
  79. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  80. <li><a href="#method.summary">Method</a></li>
  81. </ul>
  82. <ul class="subNavList">
  83. <li>Detail:&nbsp;</li>
  84. <li>Field&nbsp;|&nbsp;</li>
  85. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  86. <li><a href="#method.detail">Method</a></li>
  87. </ul>
  88. </div>
  89. <a name="skip.navbar.top">
  90. <!-- -->
  91. </a></div>
  92. <!-- ========= END OF TOP NAVBAR ========= -->
  93. <!-- ======== START OF CLASS DATA ======== -->
  94. <div class="header">
  95. <div class="subTitle">org.apache.commons.io</div>
  96. <h2 title="Class FileCleaningTracker" class="title">Class FileCleaningTracker</h2>
  97. </div>
  98. <div class="contentContainer">
  99. <ul class="inheritance">
  100. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  101. <li>
  102. <ul class="inheritance">
  103. <li>org.apache.commons.io.FileCleaningTracker</li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div class="description">
  108. <ul class="blockList">
  109. <li class="blockList">
  110. <hr>
  111. <br>
  112. <pre>public class <span class="typeNameLabel">FileCleaningTracker</span>
  113. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
  114. <div class="block">Keeps track of files awaiting deletion, and deletes them when an associated
  115. marker object is reclaimed by the garbage collector.
  116. <p>
  117. This utility creates a background thread to handle file deletion.
  118. Each file to be deleted is registered with a handler object.
  119. When the handler object is garbage collected, the file is deleted.
  120. <p>
  121. In an environment with multiple class loaders (a servlet container, for
  122. example), you should consider stopping the background thread if it is no
  123. longer needed. This is done by invoking the method
  124. <a href="../../../../org/apache/commons/io/FileCleaningTracker.html#exitWhenFinished"><code>exitWhenFinished</code></a>, typically in
  125. <code>javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)</code> or similar.</div>
  126. </li>
  127. </ul>
  128. </div>
  129. <div class="summary">
  130. <ul class="blockList">
  131. <li class="blockList">
  132. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  133. <ul class="blockList">
  134. <li class="blockList"><a name="constructor.summary">
  135. <!-- -->
  136. </a>
  137. <h3>Constructor Summary</h3>
  138. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  139. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  140. <tr>
  141. <th class="colOne" scope="col">Constructor and Description</th>
  142. </tr>
  143. <tr class="altColor">
  144. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#FileCleaningTracker--">FileCleaningTracker</a></span>()</code>&nbsp;</td>
  145. </tr>
  146. </table>
  147. </li>
  148. </ul>
  149. <!-- ========== METHOD SUMMARY =========== -->
  150. <ul class="blockList">
  151. <li class="blockList"><a name="method.summary">
  152. <!-- -->
  153. </a>
  154. <h3>Method Summary</h3>
  155. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  156. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  157. <tr>
  158. <th class="colFirst" scope="col">Modifier and Type</th>
  159. <th class="colLast" scope="col">Method and Description</th>
  160. </tr>
  161. <tr id="i0" class="altColor">
  162. <td class="colFirst"><code>void</code></td>
  163. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#exitWhenFinished--">exitWhenFinished</a></span>()</code>
  164. <div class="block">Call this method to cause the file cleaner thread to terminate when
  165. there are no more objects being tracked for deletion.</div>
  166. </td>
  167. </tr>
  168. <tr id="i1" class="rowColor">
  169. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  170. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#getDeleteFailures--">getDeleteFailures</a></span>()</code>
  171. <div class="block">Return the file paths that failed to delete.</div>
  172. </td>
  173. </tr>
  174. <tr id="i2" class="altColor">
  175. <td class="colFirst"><code>int</code></td>
  176. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#getTrackCount--">getTrackCount</a></span>()</code>
  177. <div class="block">Retrieve the number of files currently being tracked, and therefore
  178. awaiting deletion.</div>
  179. </td>
  180. </tr>
  181. <tr id="i3" class="rowColor">
  182. <td class="colFirst"><code>void</code></td>
  183. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#track-java.io.File-java.lang.Object-">track</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  184. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker)</code>
  185. <div class="block">Track the specified file, using the provided marker, deleting the file
  186. when the marker instance is garbage collected.</div>
  187. </td>
  188. </tr>
  189. <tr id="i4" class="altColor">
  190. <td class="colFirst"><code>void</code></td>
  191. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#track-java.io.File-java.lang.Object-org.apache.commons.io.FileDeleteStrategy-">track</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  192. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker,
  193. <a href="../../../../org/apache/commons/io/FileDeleteStrategy.html" title="class in org.apache.commons.io">FileDeleteStrategy</a>&nbsp;deleteStrategy)</code>
  194. <div class="block">Track the specified file, using the provided marker, deleting the file
  195. when the marker instance is garbage collected.</div>
  196. </td>
  197. </tr>
  198. <tr id="i5" class="rowColor">
  199. <td class="colFirst"><code>void</code></td>
  200. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#track-java.lang.String-java.lang.Object-">track</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
  201. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker)</code>
  202. <div class="block">Track the specified file, using the provided marker, deleting the file
  203. when the marker instance is garbage collected.</div>
  204. </td>
  205. </tr>
  206. <tr id="i6" class="altColor">
  207. <td class="colFirst"><code>void</code></td>
  208. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileCleaningTracker.html#track-java.lang.String-java.lang.Object-org.apache.commons.io.FileDeleteStrategy-">track</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
  209. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker,
  210. <a href="../../../../org/apache/commons/io/FileDeleteStrategy.html" title="class in org.apache.commons.io">FileDeleteStrategy</a>&nbsp;deleteStrategy)</code>
  211. <div class="block">Track the specified file, using the provided marker, deleting the file
  212. when the marker instance is garbage collected.</div>
  213. </td>
  214. </tr>
  215. </table>
  216. <ul class="blockList">
  217. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  218. <!-- -->
  219. </a>
  220. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  221. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  222. </ul>
  223. </li>
  224. </ul>
  225. </li>
  226. </ul>
  227. </div>
  228. <div class="details">
  229. <ul class="blockList">
  230. <li class="blockList">
  231. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  232. <ul class="blockList">
  233. <li class="blockList"><a name="constructor.detail">
  234. <!-- -->
  235. </a>
  236. <h3>Constructor Detail</h3>
  237. <a name="FileCleaningTracker--">
  238. <!-- -->
  239. </a>
  240. <ul class="blockListLast">
  241. <li class="blockList">
  242. <h4>FileCleaningTracker</h4>
  243. <pre>public&nbsp;FileCleaningTracker()</pre>
  244. </li>
  245. </ul>
  246. </li>
  247. </ul>
  248. <!-- ============ METHOD DETAIL ========== -->
  249. <ul class="blockList">
  250. <li class="blockList"><a name="method.detail">
  251. <!-- -->
  252. </a>
  253. <h3>Method Detail</h3>
  254. <a name="track-java.io.File-java.lang.Object-">
  255. <!-- -->
  256. </a>
  257. <ul class="blockList">
  258. <li class="blockList">
  259. <h4>track</h4>
  260. <pre>public&nbsp;void&nbsp;track(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  261. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker)</pre>
  262. <div class="block">Track the specified file, using the provided marker, deleting the file
  263. when the marker instance is garbage collected.
  264. The <a href="../../../../org/apache/commons/io/FileDeleteStrategy.html#NORMAL"><code>normal</code></a> deletion strategy will be used.</div>
  265. <dl>
  266. <dt><span class="paramLabel">Parameters:</span></dt>
  267. <dd><code>file</code> - the file to be tracked, not null</dd>
  268. <dd><code>marker</code> - the marker object used to track the file, not null</dd>
  269. <dt><span class="throwsLabel">Throws:</span></dt>
  270. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is null</dd>
  271. </dl>
  272. </li>
  273. </ul>
  274. <a name="track-java.io.File-java.lang.Object-org.apache.commons.io.FileDeleteStrategy-">
  275. <!-- -->
  276. </a>
  277. <ul class="blockList">
  278. <li class="blockList">
  279. <h4>track</h4>
  280. <pre>public&nbsp;void&nbsp;track(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  281. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker,
  282. <a href="../../../../org/apache/commons/io/FileDeleteStrategy.html" title="class in org.apache.commons.io">FileDeleteStrategy</a>&nbsp;deleteStrategy)</pre>
  283. <div class="block">Track the specified file, using the provided marker, deleting the file
  284. when the marker instance is garbage collected.
  285. The specified deletion strategy is used.</div>
  286. <dl>
  287. <dt><span class="paramLabel">Parameters:</span></dt>
  288. <dd><code>file</code> - the file to be tracked, not null</dd>
  289. <dd><code>marker</code> - the marker object used to track the file, not null</dd>
  290. <dd><code>deleteStrategy</code> - the strategy to delete the file, null means normal</dd>
  291. <dt><span class="throwsLabel">Throws:</span></dt>
  292. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is null</dd>
  293. </dl>
  294. </li>
  295. </ul>
  296. <a name="track-java.lang.String-java.lang.Object-">
  297. <!-- -->
  298. </a>
  299. <ul class="blockList">
  300. <li class="blockList">
  301. <h4>track</h4>
  302. <pre>public&nbsp;void&nbsp;track(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
  303. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker)</pre>
  304. <div class="block">Track the specified file, using the provided marker, deleting the file
  305. when the marker instance is garbage collected.
  306. The <a href="../../../../org/apache/commons/io/FileDeleteStrategy.html#NORMAL"><code>normal</code></a> deletion strategy will be used.</div>
  307. <dl>
  308. <dt><span class="paramLabel">Parameters:</span></dt>
  309. <dd><code>path</code> - the full path to the file to be tracked, not null</dd>
  310. <dd><code>marker</code> - the marker object used to track the file, not null</dd>
  311. <dt><span class="throwsLabel">Throws:</span></dt>
  312. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the path is null</dd>
  313. </dl>
  314. </li>
  315. </ul>
  316. <a name="track-java.lang.String-java.lang.Object-org.apache.commons.io.FileDeleteStrategy-">
  317. <!-- -->
  318. </a>
  319. <ul class="blockList">
  320. <li class="blockList">
  321. <h4>track</h4>
  322. <pre>public&nbsp;void&nbsp;track(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
  323. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;marker,
  324. <a href="../../../../org/apache/commons/io/FileDeleteStrategy.html" title="class in org.apache.commons.io">FileDeleteStrategy</a>&nbsp;deleteStrategy)</pre>
  325. <div class="block">Track the specified file, using the provided marker, deleting the file
  326. when the marker instance is garbage collected.
  327. The specified deletion strategy is used.</div>
  328. <dl>
  329. <dt><span class="paramLabel">Parameters:</span></dt>
  330. <dd><code>path</code> - the full path to the file to be tracked, not null</dd>
  331. <dd><code>marker</code> - the marker object used to track the file, not null</dd>
  332. <dd><code>deleteStrategy</code> - the strategy to delete the file, null means normal</dd>
  333. <dt><span class="throwsLabel">Throws:</span></dt>
  334. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the path is null</dd>
  335. </dl>
  336. </li>
  337. </ul>
  338. <a name="getTrackCount--">
  339. <!-- -->
  340. </a>
  341. <ul class="blockList">
  342. <li class="blockList">
  343. <h4>getTrackCount</h4>
  344. <pre>public&nbsp;int&nbsp;getTrackCount()</pre>
  345. <div class="block">Retrieve the number of files currently being tracked, and therefore
  346. awaiting deletion.</div>
  347. <dl>
  348. <dt><span class="returnLabel">Returns:</span></dt>
  349. <dd>the number of files being tracked</dd>
  350. </dl>
  351. </li>
  352. </ul>
  353. <a name="getDeleteFailures--">
  354. <!-- -->
  355. </a>
  356. <ul class="blockList">
  357. <li class="blockList">
  358. <h4>getDeleteFailures</h4>
  359. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getDeleteFailures()</pre>
  360. <div class="block">Return the file paths that failed to delete.</div>
  361. <dl>
  362. <dt><span class="returnLabel">Returns:</span></dt>
  363. <dd>the file paths that failed to delete</dd>
  364. <dt><span class="simpleTagLabel">Since:</span></dt>
  365. <dd>2.0</dd>
  366. </dl>
  367. </li>
  368. </ul>
  369. <a name="exitWhenFinished--">
  370. <!-- -->
  371. </a>
  372. <ul class="blockListLast">
  373. <li class="blockList">
  374. <h4>exitWhenFinished</h4>
  375. <pre>public&nbsp;void&nbsp;exitWhenFinished()</pre>
  376. <div class="block">Call this method to cause the file cleaner thread to terminate when
  377. there are no more objects being tracked for deletion.
  378. <p>
  379. In a simple environment, you don't need this method as the file cleaner
  380. thread will simply exit when the JVM exits. In a more complex environment,
  381. with multiple class loaders (such as an application server), you should be
  382. aware that the file cleaner thread will continue running even if the class
  383. loader it was started from terminates. This can constitute a memory leak.
  384. <p>
  385. For example, suppose that you have developed a web application, which
  386. contains the commons-io jar file in your WEB-INF/lib directory. In other
  387. words, the FileCleaner class is loaded through the class loader of your
  388. web application. If the web application is terminated, but the servlet
  389. container is still running, then the file cleaner thread will still exist,
  390. posing a memory leak.
  391. <p>
  392. This method allows the thread to be terminated. Simply call this method
  393. in the resource cleanup code, such as
  394. <code>javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)</code>.
  395. Once called, no new objects can be tracked by the file cleaner.</div>
  396. </li>
  397. </ul>
  398. </li>
  399. </ul>
  400. </li>
  401. </ul>
  402. </div>
  403. </div>
  404. <!-- ========= END OF CLASS DATA ========= -->
  405. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  406. <div class="bottomNav"><a name="navbar.bottom">
  407. <!-- -->
  408. </a>
  409. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  410. <a name="navbar.bottom.firstrow">
  411. <!-- -->
  412. </a>
  413. <ul class="navList" title="Navigation">
  414. <li><a href="../../../../overview-summary.html">Overview</a></li>
  415. <li><a href="package-summary.html">Package</a></li>
  416. <li class="navBarCell1Rev">Class</li>
  417. <li><a href="class-use/FileCleaningTracker.html">Use</a></li>
  418. <li><a href="package-tree.html">Tree</a></li>
  419. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  420. <li><a href="../../../../index-all.html">Index</a></li>
  421. <li><a href="../../../../help-doc.html">Help</a></li>
  422. </ul>
  423. </div>
  424. <div class="subNav">
  425. <ul class="navList">
  426. <li><a href="../../../../org/apache/commons/io/FileCleaner.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  427. <li><a href="../../../../org/apache/commons/io/FileDeleteStrategy.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  428. </ul>
  429. <ul class="navList">
  430. <li><a href="../../../../index.html?org/apache/commons/io/FileCleaningTracker.html" target="_top">Frames</a></li>
  431. <li><a href="FileCleaningTracker.html" target="_top">No&nbsp;Frames</a></li>
  432. </ul>
  433. <ul class="navList" id="allclasses_navbar_bottom">
  434. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  435. </ul>
  436. <div>
  437. <script type="text/javascript"><!--
  438. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  439. if(window==top) {
  440. allClassesLink.style.display = "block";
  441. }
  442. else {
  443. allClassesLink.style.display = "none";
  444. }
  445. //-->
  446. </script>
  447. </div>
  448. <div>
  449. <ul class="subNavList">
  450. <li>Summary:&nbsp;</li>
  451. <li>Nested&nbsp;|&nbsp;</li>
  452. <li>Field&nbsp;|&nbsp;</li>
  453. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  454. <li><a href="#method.summary">Method</a></li>
  455. </ul>
  456. <ul class="subNavList">
  457. <li>Detail:&nbsp;</li>
  458. <li>Field&nbsp;|&nbsp;</li>
  459. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  460. <li><a href="#method.detail">Method</a></li>
  461. </ul>
  462. </div>
  463. <a name="skip.navbar.bottom">
  464. <!-- -->
  465. </a></div>
  466. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  467. <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  468. </body>
  469. </html>