| <!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 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>SoftHashMap (Apache Shiro 1.13.0 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="SoftHashMap (Apache Shiro 1.13.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* We explicitly disable cookie tracking to avoid privacy issues */ _paq.push(['disableCookies']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo.privacy.apache.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '2']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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/SoftHashMap.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/shiro/util/SimpleByteSource.html" title="class in org.apache.shiro.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/shiro/util/StringUtils.html" title="class in org.apache.shiro.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/shiro/util/SoftHashMap.html" target="_top">Frames</a></li> |
| <li><a href="SoftHashMap.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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.shiro.util</div> |
| <h2 title="Class SoftHashMap" class="title">Class SoftHashMap<K,V></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.util.SoftHashMap<K,V></li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><K,V></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.47">SoftHashMap</a><K,V> |
| extends <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><K,V></pre> |
| <div class="block">A <code><em>Soft</em>HashMap</code> is a memory-constrained map that stores its <em>values</em> in |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><code>SoftReference</code></a>s. (Contrast this with the JDK's |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/util/WeakHashMap.html?is-external=true" title="class or interface in java.util"><code>WeakHashMap</code></a>, which uses weak references for its <em>keys</em>, which is of little value if you |
| want the cache to auto-resize itself based on memory constraints). |
| <p/> |
| Having the values wrapped by soft references allows the cache to automatically reduce its size based on memory |
| limitations and garbage collection. This ensures that the cache will not cause memory leaks by holding strong |
| references to all of its values. |
| <p/> |
| This class is a generics-enabled Map based on initial ideas from Heinz Kabutz's and Sydney Redelinghuys's |
| <a href="http://www.javaspecialists.eu/archive/Issue015.html">publicly posted version (with their approval)</a>, with |
| continued modifications. |
| <p/> |
| This implementation is thread-safe and usable in concurrent environments.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.java.util.Map"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface java.util.<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></h3> |
| <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">K</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">V</a>></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#SoftHashMap--">SoftHashMap</a></span>()</code> |
| <div class="block">Creates a new SoftHashMap with a default retention size size of |
| <a href="../../../../org/apache/shiro/util/SoftHashMap.html#DEFAULT_RETENTION_SIZE"><code>DEFAULT_RETENTION_SIZE</code></a> (100 entries).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#SoftHashMap-int-">SoftHashMap</a></span>(int retentionSize)</code> |
| <div class="block">Creates a new SoftHashMap with the specified retention size.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#SoftHashMap-java.util.Map-">SoftHashMap</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> source)</code> |
| <div class="block">Creates a <code>SoftHashMap</code> backed by the specified <code>source</code>, with a default retention |
| size of <a href="../../../../org/apache/shiro/util/SoftHashMap.html#DEFAULT_RETENTION_SIZE"><code>DEFAULT_RETENTION_SIZE</code></a> (100 entries).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#SoftHashMap-java.util.Map-int-">SoftHashMap</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> source, |
| int retentionSize)</code> |
| <div class="block">Creates a <code>SoftHashMap</code> backed by the specified <code>source</code>, with the specified retention size.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#clear--">clear</a></span>()</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#containsKey-java.lang.Object-">containsKey</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#containsValue-java.lang.Object-">containsValue</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#entrySet--">entrySet</a></span>()</code> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#get-java.lang.Object-">get</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#isEmpty--">isEmpty</a></span>()</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#keySet--">keySet</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#put-K-V-">put</a></span>(<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a> key, |
| <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a> value)</code> |
| <div class="block">Creates a new entry, but wraps the value in a SoftValue instance to enable auto garbage collection.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#putAll-java.util.Map-">putAll</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><? extends <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,? extends <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> m)</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#remove-java.lang.Object-">remove</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#size--">size</a></span>()</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/shiro/util/SoftHashMap.html#values--">values</a></span>()</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.util.Map"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface java.util.<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></h3> |
| <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#compute-K-java.util.function.BiFunction-" title="class or interface in java.util">compute</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#computeIfAbsent-K-java.util.function.Function-" title="class or interface in java.util">computeIfAbsent</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#computeIfPresent-K-java.util.function.BiFunction-" title="class or interface in java.util">computeIfPresent</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.util">equals</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#forEach-java.util.function.BiConsumer-" title="class or interface in java.util">forEach</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#getOrDefault-java.lang.Object-V-" title="class or interface in java.util">getOrDefault</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#hashCode--" title="class or interface in java.util">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#merge-K-V-java.util.function.BiFunction-" title="class or interface in java.util">merge</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#putIfAbsent-K-V-" title="class or interface in java.util">putIfAbsent</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#remove-java.lang.Object-java.lang.Object-" title="class or interface in java.util">remove</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#replace-K-V-" title="class or interface in java.util">replace</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#replace-K-V-V-" title="class or interface in java.util">replace</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#replaceAll-java.util.function.BiFunction-" title="class or interface in java.util">replaceAll</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="SoftHashMap--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SoftHashMap</h4> |
| <pre>public <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.82">SoftHashMap</a>()</pre> |
| <div class="block">Creates a new SoftHashMap with a default retention size size of |
| <a href="../../../../org/apache/shiro/util/SoftHashMap.html#DEFAULT_RETENTION_SIZE"><code>DEFAULT_RETENTION_SIZE</code></a> (100 entries).</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/shiro/util/SoftHashMap.html#SoftHashMap-int-"><code>SoftHashMap(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SoftHashMap-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SoftHashMap</h4> |
| <pre>public <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.102">SoftHashMap</a>(int retentionSize)</pre> |
| <div class="block">Creates a new SoftHashMap with the specified retention size. |
| <p/> |
| The retention size (n) is the total number of most recent entries in the map that will be strongly referenced |
| (ie 'retained') to prevent them from being eagerly garbage collected. That is, the point of a SoftHashMap is to |
| allow the garbage collector to remove as many entries from this map as it desires, but there will always be (n) |
| elements retained after a GC due to the strong references. |
| <p/> |
| Note that in a highly concurrent environments the exact total number of strong references may differ slightly |
| than the actual <code>retentionSize</code> value. This number is intended to be a best-effort retention low |
| water mark.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>retentionSize</code> - the total number of most recent entries in the map that will be strongly referenced |
| (retained), preventing them from being eagerly garbage collected by the JVM.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SoftHashMap-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SoftHashMap</h4> |
| <pre>public <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.118">SoftHashMap</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> source)</pre> |
| <div class="block">Creates a <code>SoftHashMap</code> backed by the specified <code>source</code>, with a default retention |
| size of <a href="../../../../org/apache/shiro/util/SoftHashMap.html#DEFAULT_RETENTION_SIZE"><code>DEFAULT_RETENTION_SIZE</code></a> (100 entries).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the backing map to populate this <code>SoftHashMap</code></dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/shiro/util/SoftHashMap.html#SoftHashMap-java.util.Map-int-"><code>SoftHashMap(Map,int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SoftHashMap-java.util.Map-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SoftHashMap</h4> |
| <pre>public <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.139">SoftHashMap</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> source, |
| int retentionSize)</pre> |
| <div class="block">Creates a <code>SoftHashMap</code> backed by the specified <code>source</code>, with the specified retention size. |
| <p/> |
| The retention size (n) is the total number of most recent entries in the map that will be strongly referenced |
| (ie 'retained') to prevent them from being eagerly garbage collected. That is, the point of a SoftHashMap is to |
| allow the garbage collector to remove as many entries from this map as it desires, but there will always be (n) |
| elements retained after a GC due to the strong references. |
| <p/> |
| Note that in a highly concurrent environments the exact total number of strong references may differ slightly |
| than the actual <code>retentionSize</code> value. This number is intended to be a best-effort retention low |
| water mark.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the backing map to populate this <code>SoftHashMap</code></dd> |
| <dd><code>retentionSize</code> - the total number of most recent entries in the map that will be strongly referenced |
| (retained), preventing them from being eagerly garbage collected by the JVM.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="get-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre>public <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a> <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.144">get</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#get-java.lang.Object-" title="class or interface in java.util">get</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isEmpty--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEmpty</h4> |
| <pre>public boolean <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.197">isEmpty</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#isEmpty--" title="class or interface in java.util">isEmpty</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="containsKey-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>containsKey</h4> |
| <pre>public boolean <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.202">containsKey</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsKey-java.lang.Object-" title="class or interface in java.util">containsKey</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="containsValue-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>containsValue</h4> |
| <pre>public boolean <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.207">containsValue</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsValue-java.lang.Object-" title="class or interface in java.util">containsValue</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putAll-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putAll</h4> |
| <pre>public void <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.213">putAll</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><? extends <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,? extends <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> m)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#putAll-java.util.Map-" title="class or interface in java.util">putAll</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="keySet--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>keySet</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>> <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.223">keySet</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#keySet--" title="class or interface in java.util">keySet</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="values--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>values</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>> <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.228">values</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#values--" title="class or interface in java.util">values</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="put-java.lang.Object-java.lang.Object-"> |
| <!-- --> |
| </a><a name="put-K-V-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>put</h4> |
| <pre>public <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a> <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.248">put</a>(<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a> key, |
| <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a> value)</pre> |
| <div class="block">Creates a new entry, but wraps the value in a SoftValue instance to enable auto garbage collection.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#put-K-V-" title="class or interface in java.util">put</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="remove-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remove</h4> |
| <pre>public <a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a> <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.256">remove</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#remove-java.lang.Object-" title="class or interface in java.util">remove</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clear--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clear</h4> |
| <pre>public void <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.262">clear</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#clear--" title="class or interface in java.util">clear</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="size--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>size</h4> |
| <pre>public int <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.273">size</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#size--" title="class or interface in java.util">size</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="entrySet--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>entrySet</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>>> <a href="../../../../src-html/org/apache/shiro/util/SoftHashMap.html#line.278">entrySet</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#entrySet--" title="class or interface in java.util">entrySet</a></code> in interface <code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">K</a>,<a href="../../../../org/apache/shiro/util/SoftHashMap.html" title="type parameter in SoftHashMap">V</a>></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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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/SoftHashMap.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/shiro/util/SimpleByteSource.html" title="class in org.apache.shiro.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/shiro/util/StringUtils.html" title="class in org.apache.shiro.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/shiro/util/SoftHashMap.html" target="_top">Frames</a></li> |
| <li><a href="SoftHashMap.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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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>Copyright © 2004–2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |