blob: 0e7ea22285f4e3f237876de79cc8721183362c88 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.11) on Mon Jun 14 16:37:38 EDT 2021 -->
<title>Pool (Jetty :: Project 9.4.42.v20210604 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-06-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Pool (Jetty :: Project 9.4.42.v20210604 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":42,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":42,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Pool.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" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.eclipse.jetty.util</a></div>
<h2 title="Class Pool" class="title">Class Pool&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.util.Pool&lt;T&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - </dd>
</dl>
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.lang.AutoCloseable</code>, <code><a href="component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">Pool&lt;T&gt;</span>
extends java.lang.Object
implements java.lang.AutoCloseable, <a href="component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></pre>
<div class="block">A fast pool of objects, with optional support for
multiplexing, max usage count and several optimized strategies plus
an optional <code>ThreadLocal</code> cache of the last release entry.
<p>
When the method <a href="#close()"><code>close()</code></a> is called, all <code>Closeable</code>s in the pool
are also closed.
</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Pool.StrategyType.html" title="enum in org.eclipse.jetty.util">Pool.StrategyType</a></span></code></th>
<td class="colLast">
<div class="block">The type of the strategy to use for the pool.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.Dumpable">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></h3>
<code><a href="component/Dumpable.DumpableContainer.html" title="interface in org.eclipse.jetty.util.component">Dumpable.DumpableContainer</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.eclipse.jetty.util.component.Dumpable">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></h3>
<code><a href="component/Dumpable.html#KEY">KEY</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.eclipse.jetty.util.Pool.StrategyType,int)">Pool</a></span>&#8203;(<a href="Pool.StrategyType.html" title="enum in org.eclipse.jetty.util">Pool.StrategyType</a>&nbsp;strategyType,
int&nbsp;maxEntries)</code></th>
<td class="colLast">
<div class="block">Construct a Pool with a specified lookup strategy and no
<code>ThreadLocal</code> cache.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.eclipse.jetty.util.Pool.StrategyType,int,boolean)">Pool</a></span>&#8203;(<a href="Pool.StrategyType.html" title="enum in org.eclipse.jetty.util">Pool.StrategyType</a>&nbsp;strategyType,
int&nbsp;maxEntries,
boolean&nbsp;cache)</code></th>
<td class="colLast">
<div class="block">Construct a Pool with the specified thread-local cache size and
an optional <code>ThreadLocal</code> cache.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquire()">acquire</a></span>()</code></th>
<td class="colLast">
<div class="block">Acquire an entry from the pool.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquire(java.util.function.Function)">acquire</a></span>&#8203;(java.util.function.Function&lt;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>,&#8203;<a href="Pool.html" title="type parameter in Pool">T</a>&gt;&nbsp;creator)</code></th>
<td class="colLast">
<div class="block">Utility method to acquire an entry from the pool,
reserving and creating a new entry if necessary.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquireAt(int)">acquireAt</a></span>&#8203;(int&nbsp;idx)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">No longer supported.</div>
</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dump(java.lang.Appendable,java.lang.String)">dump</a></span>&#8203;(java.lang.Appendable&nbsp;out,
java.lang.String&nbsp;indent)</code></th>
<td class="colLast">
<div class="block">Dump this object (and children) into an Appendable using the provided indent after any new lines.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getClosedCount()">getClosedCount</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIdleCount()">getIdleCount</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInUseCount()">getInUseCount</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxEntries()">getMaxEntries</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxMultiplex()">getMaxMultiplex</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxUsageCount()">getMaxUsageCount</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the maximum number of times the entries of the pool
can be acquired.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReservedCount()">getReservedCount</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isClosed()">isClosed</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release(org.eclipse.jetty.util.Pool.Entry)">release</a></span>&#8203;(<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;entry)</code></th>
<td class="colLast">
<div class="block">This method will return an acquired object to the pool.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove(org.eclipse.jetty.util.Pool.Entry)">remove</a></span>&#8203;(<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;entry)</code></th>
<td class="colLast">
<div class="block">Remove a value from the pool.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reserve()">reserve</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new disabled slot into the pool.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reserve(int)">reserve</a></span>&#8203;(int&nbsp;allotment)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#reserve()"><code>reserve()</code></a> instead</div>
</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxMultiplex(int)">setMaxMultiplex</a></span>&#8203;(int&nbsp;maxMultiplex)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxUsageCount(int)">setMaxUsageCount</a></span>&#8203;(int&nbsp;maxUsageCount)</code></th>
<td class="colLast">
<div class="block">Change the max usage count of the pool's entries.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#size()">size</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#values()">values</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.Dumpable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></h3>
<code><a href="component/Dumpable.html#dump()">dump</a>, <a href="component/Dumpable.html#dumpSelf()">dumpSelf</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.eclipse.jetty.util.Pool.StrategyType,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Pool</h4>
<pre>public&nbsp;Pool&#8203;(<a href="Pool.StrategyType.html" title="enum in org.eclipse.jetty.util">Pool.StrategyType</a>&nbsp;strategyType,
int&nbsp;maxEntries)</pre>
<div class="block">Construct a Pool with a specified lookup strategy and no
<code>ThreadLocal</code> cache.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>strategyType</code> - The strategy to used for looking up entries.</dd>
<dd><code>maxEntries</code> - the maximum amount of entries that the pool will accept.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.eclipse.jetty.util.Pool.StrategyType,int,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Pool</h4>
<pre>public&nbsp;Pool&#8203;(<a href="Pool.StrategyType.html" title="enum in org.eclipse.jetty.util">Pool.StrategyType</a>&nbsp;strategyType,
int&nbsp;maxEntries,
boolean&nbsp;cache)</pre>
<div class="block">Construct a Pool with the specified thread-local cache size and
an optional <code>ThreadLocal</code> cache.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>strategyType</code> - The strategy to used for looking up entries.</dd>
<dd><code>maxEntries</code> - the maximum amount of entries that the pool will accept.</dd>
<dd><code>cache</code> - True if a <code>ThreadLocal</code> cache should be used to try the most recently released entry.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getReservedCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReservedCount</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getReservedCount()</pre>
</li>
</ul>
<a id="getIdleCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIdleCount</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getIdleCount()</pre>
</li>
</ul>
<a id="getInUseCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInUseCount</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getInUseCount()</pre>
</li>
</ul>
<a id="getClosedCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClosedCount</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getClosedCount()</pre>
</li>
</ul>
<a id="getMaxEntries()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxEntries</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getMaxEntries()</pre>
</li>
</ul>
<a id="getMaxMultiplex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxMultiplex</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getMaxMultiplex()</pre>
</li>
</ul>
<a id="setMaxMultiplex(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxMultiplex</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setMaxMultiplex&#8203;(int&nbsp;maxMultiplex)</pre>
</li>
</ul>
<a id="getMaxUsageCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxUsageCount</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getMaxUsageCount()</pre>
<div class="block">Get the maximum number of times the entries of the pool
can be acquired.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the max usage count.</dd>
</dl>
</li>
</ul>
<a id="setMaxUsageCount(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxUsageCount</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setMaxUsageCount&#8203;(int&nbsp;maxUsageCount)</pre>
<div class="block">Change the max usage count of the pool's entries. All existing
idle entries over this new max usage are removed and closed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxUsageCount</code> - the max usage count.</dd>
</dl>
</li>
</ul>
<a id="reserve(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reserve</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;reserve&#8203;(int&nbsp;allotment)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#reserve()"><code>reserve()</code></a> instead</div>
</div>
<div class="block">Create a new disabled slot into the pool.
The returned entry must ultimately have the <a href="Pool.Entry.html#enable(T,boolean)"><code>Pool.Entry.enable(Object, boolean)</code></a>
method called or be removed via <a href="Pool.Entry.html#remove()"><code>Pool.Entry.remove()</code></a> or
<a href="#remove(org.eclipse.jetty.util.Pool.Entry)"><code>remove(Pool.Entry)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>allotment</code> - the desired allotment, where each entry handles an allotment of maxMultiplex,
or a negative number to always trigger the reservation of a new entry.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a disabled entry that is contained in the pool,
or null if the pool is closed or if the pool already contains
<a href="#getMaxEntries()"><code>getMaxEntries()</code></a> entries, or the allotment has already been reserved</dd>
</dl>
</li>
</ul>
<a id="reserve()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reserve</h4>
<pre class="methodSignature">public&nbsp;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;reserve()</pre>
<div class="block">Create a new disabled slot into the pool.
The returned entry must ultimately have the <a href="Pool.Entry.html#enable(T,boolean)"><code>Pool.Entry.enable(Object, boolean)</code></a>
method called or be removed via <a href="Pool.Entry.html#remove()"><code>Pool.Entry.remove()</code></a> or
<a href="#remove(org.eclipse.jetty.util.Pool.Entry)"><code>remove(Pool.Entry)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a disabled entry that is contained in the pool,
or null if the pool is closed or if the pool already contains
<a href="#getMaxEntries()"><code>getMaxEntries()</code></a> entries</dd>
</dl>
</li>
</ul>
<a id="acquireAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquireAt</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;acquireAt&#8203;(int&nbsp;idx)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">No longer supported. Instead use a <a href="Pool.StrategyType.html" title="enum in org.eclipse.jetty.util"><code>Pool.StrategyType</code></a> to configure the pool.</div>
</div>
<div class="block">Acquire the entry from the pool at the specified index. This method bypasses the thread-local mechanism.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>idx</code> - the index of the entry to acquire.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the specified entry or null if there is none at the specified index or if it is not available.</dd>
</dl>
</li>
</ul>
<a id="acquire()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquire</h4>
<pre class="methodSignature">public&nbsp;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;acquire()</pre>
<div class="block">Acquire an entry from the pool.
Only enabled entries will be returned from this method and their enable method must not be called.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an entry from the pool or null if none is available.</dd>
</dl>
</li>
</ul>
<a id="acquire(java.util.function.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquire</h4>
<pre class="methodSignature">public&nbsp;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;acquire&#8203;(java.util.function.Function&lt;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>,&#8203;<a href="Pool.html" title="type parameter in Pool">T</a>&gt;&nbsp;creator)</pre>
<div class="block">Utility method to acquire an entry from the pool,
reserving and creating a new entry if necessary.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>creator</code> - a function to create the pooled value for a reserved entry.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an entry from the pool or null if none is available.</dd>
</dl>
</li>
</ul>
<a id="release(org.eclipse.jetty.util.Pool.Entry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;release&#8203;(<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;entry)</pre>
<div class="block">This method will return an acquired object to the pool. Objects
that are acquired from the pool but never released will result
in a memory leak.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entry</code> - the value to return to the pool</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the entry was released and could be acquired again,
false if the entry should be removed by calling <a href="#remove(org.eclipse.jetty.util.Pool.Entry)"><code>remove(Pool.Entry)</code></a>
and the object contained by the entry should be disposed.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if value is null</dd>
</dl>
</li>
</ul>
<a id="remove(org.eclipse.jetty.util.Pool.Entry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;remove&#8203;(<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&nbsp;entry)</pre>
<div class="block">Remove a value from the pool.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entry</code> - the value to remove</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the entry was removed, false otherwise</dd>
</dl>
</li>
</ul>
<a id="isClosed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClosed</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isClosed()</pre>
</li>
</ul>
<a id="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;close()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>
</dl>
</li>
</ul>
<a id="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;size()</pre>
</li>
</ul>
<a id="values()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre class="methodSignature">public&nbsp;java.util.Collection&lt;<a href="Pool.Entry.html" title="class in org.eclipse.jetty.util">Pool.Entry</a>&gt;&nbsp;values()</pre>
</li>
</ul>
<a id="dump(java.lang.Appendable,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dump</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dump&#8203;(java.lang.Appendable&nbsp;out,
java.lang.String&nbsp;indent)
throws java.io.IOException</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="component/Dumpable.html#dump(java.lang.Appendable,java.lang.String)">Dumpable</a></code></span></div>
<div class="block">Dump this object (and children) into an Appendable using the provided indent after any new lines.
The indent should not be applied to the first object dumped.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="component/Dumpable.html#dump(java.lang.Appendable,java.lang.String)">dump</a></code>&nbsp;in interface&nbsp;<code><a href="component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - The appendable to dump to</dd>
<dd><code>indent</code> - The indent to apply after any new lines.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if unable to write to Appendable</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Pool.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" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2021 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>