<li><ahref="../../../../com/comphenix/protocol/concurrency/AbstractIntervalTree.State.html"title="enum in com.comphenix.protocol.concurrency"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../com/comphenix/protocol/concurrency/IntegerSet.html"title="class in com.comphenix.protocol.concurrency"><spanclass="strong">Next Class</span></a></li>
<dl><dt><spanclass="strong">Type Parameters:</span></dt><dd><code>TKey</code> - - type of the key.</dd><dd><code>TValue</code> - - type of the value.</dd></dl>
<hr>
<br>
<pre>public class <spanclass="strong">BlockingHashMap<TKey,TValue></span>
extends java.lang.Object</pre>
<divclass="block">A map that supports blocking on read operations. Null keys are not supported.
<p>
Keys are stored as weak references, and will be automatically removed once they've all been dereferenced.
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Method and Description</th>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>static <TKey,TValue> <br><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="class in com.comphenix.protocol.concurrency">BlockingHashMap</a><TKey,TValue></code></td>
<tdclass="colFirst"><code><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a></code></td>
<tdclass="colLast"><code><strong><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html#get(TKey)">get</a></strong>(<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a> key)</code>
<divclass="block">Waits until a value has been associated with the given key, and then retrieves that value.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a></code></td>
<tdclass="colLast"><code><strong><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html#get(TKey, long, java.util.concurrent.TimeUnit)">get</a></strong>(<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a> key,
long timeout,
java.util.concurrent.TimeUnit unit)</code>
<divclass="block">Waits until a value has been associated with the given key, and then retrieves that value.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>java.util.Set<<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a>></code></td>
<tdclass="colFirst"><code><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a></code></td>
<tdclass="colLast"><code><strong><ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html#put(TKey, TValue)">put</a></strong>(<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a> key,
<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a> value)</code>
<divclass="block">Associate a given key with the given value.</div>
<tdclass="colFirst"><code>java.util.Collection<<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a>></code></td>
<pre>public static <TKey,TValue> <ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="class in com.comphenix.protocol.concurrency">BlockingHashMap</a><TKey,TValue> create()</pre>
<divclass="block">Initialize a new map.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The created map.</dd></dl>
</li>
</ul>
<aname="get(java.lang.Object)">
<!---->
</a><aname="get(TKey)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>get</h4>
<pre>public <ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a> get(<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a> key)
throws java.lang.InterruptedException</pre>
<divclass="block">Waits until a value has been associated with the given key, and then retrieves that value.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>key</code> - - the key whose associated value is to be returned</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value to which the specified key is mapped.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.InterruptedException</code> - If the current thread got interrupted while waiting.</dd></dl>
<pre>public <ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a> get(<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a> key,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException</pre>
<divclass="block">Waits until a value has been associated with the given key, and then retrieves that value.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>key</code> - - the key whose associated value is to be returned</dd><dd><code>timeout</code> - - the amount of time to wait until an association has been made.</dd><dd><code>unit</code> - - unit of timeout.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value to which the specified key is mapped, or NULL if the timeout elapsed.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.InterruptedException</code> - If the current thread got interrupted while waiting.</dd></dl>
</li>
</ul>
<aname="put(java.lang.Object,java.lang.Object)">
<!---->
</a><aname="put(TKey, TValue)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>put</h4>
<pre>public <ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a> put(<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a> key,
<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a> value)</pre>
<divclass="block">Associate a given key with the given value.
<p>
Wakes up any blocking getters on this specific key.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>key</code> - - the key to associate.</dd><dd><code>value</code> - - the value.</dd>
<pre>public java.util.Collection<<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TValue</a>> values()</pre>
</li>
</ul>
<aname="keys()">
<!---->
</a>
<ulclass="blockListLast">
<liclass="blockList">
<h4>keys</h4>
<pre>public java.util.Set<<ahref="../../../../com/comphenix/protocol/concurrency/BlockingHashMap.html"title="type parameter in BlockingHashMap">TKey</a>> keys()</pre>
<li><ahref="../../../../com/comphenix/protocol/concurrency/AbstractIntervalTree.State.html"title="enum in com.comphenix.protocol.concurrency"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../com/comphenix/protocol/concurrency/IntegerSet.html"title="class in com.comphenix.protocol.concurrency"><spanclass="strong">Next Class</span></a></li>