| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_80) on Sun Nov 19 01:24:14 MST 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>ThreadContext.ContextStack (Apache Log4j API 2.10.0 API)</title> |
| <meta name="date" content="2017-11-19"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ThreadContext.ContextStack (Apache Log4j API 2.10.0 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ThreadContext.ContextStack.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/logging/log4j/ThreadContext.html" title="class in org.apache.logging.log4j"><span class="strong">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/logging/log4j/ThreadContext.ContextStack.html" target="_top">Frames</a></li> |
| <li><a href="ThreadContext.ContextStack.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.logging.log4j</div> |
| <h2 title="Interface ThreadContext.ContextStack" class="title">Interface ThreadContext.ContextStack</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<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>>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<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>>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><a href="../../../../org/apache/logging/log4j/spi/ThreadContextStack.html" title="interface in org.apache.logging.log4j.spi">ThreadContextStack</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../org/apache/logging/log4j/spi/DefaultThreadContextStack.html" title="class in org.apache.logging.log4j.spi">DefaultThreadContextStack</a>, <a href="../../../../org/apache/logging/log4j/spi/MutableThreadContextStack.html" title="class in org.apache.logging.log4j.spi">MutableThreadContextStack</a></dd> |
| </dl> |
| <dl> |
| <dt>Enclosing class:</dt> |
| <dd><a href="../../../../org/apache/logging/log4j/ThreadContext.html" title="class in org.apache.logging.log4j">ThreadContext</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public static interface <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.html#line.548">ThreadContext.ContextStack</a> |
| extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<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>></pre> |
| <div class="block">The ThreadContext Stack interface.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <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><<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>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#asList()">asList</a></strong>()</code> |
| <div class="block">Returns all the elements in the stack in a List.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html" title="interface in org.apache.logging.log4j">ThreadContext.ContextStack</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#copy()">copy</a></strong>()</code> |
| <div class="block">Returns a copy of the ContextStack.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#getDepth()">getDepth</a></strong>()</code> |
| <div class="block">Returns the number of elements in the stack.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html" title="interface in org.apache.logging.log4j">ThreadContext.ContextStack</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#getImmutableStackOrNull()">getImmutableStackOrNull</a></strong>()</code> |
| <div class="block">Returns a ContextStack with the same contents as this ContextStack or <code>null</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><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></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#peek()">peek</a></strong>()</code> |
| <div class="block">Returns the element at the top of the stack without removing it or null if the stack is empty.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><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></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#pop()">pop</a></strong>()</code> |
| <div class="block">Returns the element at the top of the stack.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#push(java.lang.String)">push</a></strong>(<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> message)</code> |
| <div class="block">Pushes an element onto the stack.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html#trim(int)">trim</a></strong>(int depth)</code> |
| <div class="block">Trims elements from the end of the stack.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.util.Collection"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface java.util.<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util">add</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util">addAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#clear()" title="class or interface in java.util">clear</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util">contains</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util">iterator</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#size()" title="class or interface in java.util">size</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#toArray()" title="class or interface in java.util">toArray</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true#toArray(T[])" title="class or interface in java.util">toArray</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="pop()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pop</h4> |
| <pre><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> <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.556">pop</a>()</pre> |
| <div class="block">Returns the element at the top of the stack.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The element at the top of the stack.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util">NoSuchElementException</a></code> - if the stack is empty.</dd></dl> |
| </li> |
| </ul> |
| <a name="peek()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>peek</h4> |
| <pre><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> <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.563">peek</a>()</pre> |
| <div class="block">Returns the element at the top of the stack without removing it or null if the stack is empty.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the element at the top of the stack or null if the stack is empty.</dd></dl> |
| </li> |
| </ul> |
| <a name="push(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>push</h4> |
| <pre>void <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.570">push</a>(<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> message)</pre> |
| <div class="block">Pushes an element onto the stack.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - The element to add.</dd></dl> |
| </li> |
| </ul> |
| <a name="getDepth()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDepth</h4> |
| <pre>int <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.577">getDepth</a>()</pre> |
| <div class="block">Returns the number of elements in the stack.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the number of elements in the stack.</dd></dl> |
| </li> |
| </ul> |
| <a name="asList()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>asList</h4> |
| <pre><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><<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>> <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.584">asList</a>()</pre> |
| <div class="block">Returns all the elements in the stack in a List.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>all the elements in the stack in a List.</dd></dl> |
| </li> |
| </ul> |
| <a name="trim(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trim</h4> |
| <pre>void <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.591">trim</a>(int depth)</pre> |
| <div class="block">Trims elements from the end of the stack.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>depth</code> - The maximum number of items in the stack to keep.</dd></dl> |
| </li> |
| </ul> |
| <a name="copy()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copy</h4> |
| <pre><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html" title="interface in org.apache.logging.log4j">ThreadContext.ContextStack</a> <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.598">copy</a>()</pre> |
| <div class="block">Returns a copy of the ContextStack.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a copy of the ContextStack.</dd></dl> |
| </li> |
| </ul> |
| <a name="getImmutableStackOrNull()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getImmutableStackOrNull</h4> |
| <pre><a href="../../../../org/apache/logging/log4j/ThreadContext.ContextStack.html" title="interface in org.apache.logging.log4j">ThreadContext.ContextStack</a> <a href="../../../../src-html/org/apache/logging/log4j/ThreadContext.ContextStack.html#line.606">getImmutableStackOrNull</a>()</pre> |
| <div class="block">Returns a ContextStack with the same contents as this ContextStack or <code>null</code>. Attempts to modify the |
| returned stack may or may not throw an exception, but will not affect the contents of this ContextStack.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a ContextStack with the same contents as this ContextStack or <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ThreadContext.ContextStack.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/logging/log4j/ThreadContext.html" title="class in org.apache.logging.log4j"><span class="strong">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/logging/log4j/ThreadContext.ContextStack.html" target="_top">Frames</a></li> |
| <li><a href="ThreadContext.ContextStack.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><p align="center">Copyright © 1999-2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br /> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p></small></p> |
| </body> |
| </html> |