1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.6.0_30) on Tue Nov 19 11:16:55 CET 2013 -->
6 <META http-equiv="Content-Type" content="text/html; charset=utf-8">
8 ConcurrentLFUCache (Solr 4.6.0 API)
11 <META NAME="date" CONTENT="2013-11-19">
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
15 <SCRIPT type="text/javascript">
16 function windowTitle()
18 if (location.href.indexOf('is-external=true') == -1) {
19 parent.document.title="ConcurrentLFUCache (Solr 4.6.0 API)";
28 <BODY BGCOLOR="white" onload="windowTitle();">
32 <!-- ========= START OF TOP NAVBAR ======= -->
33 <A NAME="navbar_top"><!-- --></A>
34 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
37 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38 <A NAME="navbar_top_firstrow"><!-- --></A>
39 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40 <TR ALIGN="center" VALIGN="top">
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ConcurrentLFUCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58 <A HREF="../../../../org/apache/solr/util/BoundedTreeSet.html" title="class in org.apache.solr.util"><B>PREV CLASS</B></A>
59 <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="interface in org.apache.solr.util"><B>NEXT CLASS</B></A></FONT></TD>
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61 <A HREF="../../../../index.html?org/apache/solr/util/ConcurrentLFUCache.html" target="_top"><B>FRAMES</B></A>
62 <A HREF="ConcurrentLFUCache.html" target="_top"><B>NO FRAMES</B></A>
63 <SCRIPT type="text/javascript">
66 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
71 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
84 <A NAME="skip-navbar_top"></A>
85 <!-- ========= END OF TOP NAVBAR ========= -->
88 <!-- ======== START OF CLASS DATA ======== -->
91 org.apache.solr.util</FONT>
93 Class ConcurrentLFUCache<K,V></H2>
95 <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.solr.util.ConcurrentLFUCache<K,V></B>
100 <DT><PRE>public class <B>ConcurrentLFUCache<K,V></B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
104 A LFU cache implementation based upon ConcurrentHashMap.
106 This is not a terribly efficient implementation. The tricks used in the
107 LRU version were not directly usable, perhaps it might be possible to
108 rewrite them with LFU in mind.
110 <b>This API is experimental and subject to change</b>
115 <DT><B>Since:</B></DT>
121 <!-- ======== NESTED CLASS SUMMARY ======== -->
123 <A NAME="nested_class_summary"><!-- --></A>
124 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
127 <B>Nested Class Summary</B></FONT></TH>
129 <TR BGCOLOR="white" CLASS="TableRowColor">
130 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131 <CODE>static interface</CODE></FONT></TD>
132 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="interface in org.apache.solr.util">ConcurrentLFUCache.EvictionListener</A><<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="type parameter in ConcurrentLFUCache.EvictionListener">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="type parameter in ConcurrentLFUCache.EvictionListener">V</A>></B></CODE>
135 </TD>
137 <TR BGCOLOR="white" CLASS="TableRowColor">
138 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139 <CODE>static class</CODE></FONT></TD>
140 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.Stats.html" title="class in org.apache.solr.util">ConcurrentLFUCache.Stats</A></B></CODE>
143 </TD>
147 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
149 <A NAME="constructor_summary"><!-- --></A>
150 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
151 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
152 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
153 <B>Constructor Summary</B></FONT></TH>
155 <TR BGCOLOR="white" CLASS="TableRowColor">
156 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#ConcurrentLFUCache(int, int)">ConcurrentLFUCache</A></B>(int size,
157 int lowerWatermark)</CODE>
160 </TD>
162 <TR BGCOLOR="white" CLASS="TableRowColor">
163 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#ConcurrentLFUCache(int, int, int, int, boolean, boolean, org.apache.solr.util.ConcurrentLFUCache.EvictionListener, boolean)">ConcurrentLFUCache</A></B>(int upperWaterMark,
164 int lowerWaterMark,
165 int acceptableSize,
166 int initialSize,
167 boolean runCleanupThread,
168 boolean runNewThreadForCleanup,
169 <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="interface in org.apache.solr.util">ConcurrentLFUCache.EvictionListener</A><<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>> evictionListener,
170 boolean timeDecay)</CODE>
173 </TD>
177 <!-- ========== METHOD SUMMARY =========== -->
179 <A NAME="method_summary"><!-- --></A>
180 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
181 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
182 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
183 <B>Method Summary</B></FONT></TH>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187 <CODE> void</CODE></FONT></TD>
188 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#clear()">clear</A></B>()</CODE>
191 </TD>
193 <TR BGCOLOR="white" CLASS="TableRowColor">
194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195 <CODE> void</CODE></FONT></TD>
196 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#destroy()">destroy</A></B>()</CODE>
199 </TD>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>protected void</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#finalize()">finalize</A></B>()</CODE>
207 </TD>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE> <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A></CODE></FONT></TD>
212 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#get(K)">get</A></B>(<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A> key)</CODE>
215 </TD>
217 <TR BGCOLOR="white" CLASS="TableRowColor">
218 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219 <CODE> <A HREF="http://download.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/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>></CODE></FONT></TD>
220 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#getLeastUsedItems(int)">getLeastUsedItems</A></B>(int n)</CODE>
223 Returns 'n' number of least used entries present in this cache.</TD>
225 <TR BGCOLOR="white" CLASS="TableRowColor">
226 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227 <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>,org.apache.solr.util.ConcurrentLFUCache.CacheEntry<<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>>></CODE></FONT></TD>
228 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#getMap()">getMap</A></B>()</CODE>
231 </TD>
233 <TR BGCOLOR="white" CLASS="TableRowColor">
234 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235 <CODE> <A HREF="http://download.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/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>></CODE></FONT></TD>
236 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#getMostUsedItems(int)">getMostUsedItems</A></B>(int n)</CODE>
239 Returns 'n' number of most used entries present in this cache.</TD>
241 <TR BGCOLOR="white" CLASS="TableRowColor">
242 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243 <CODE> <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.Stats.html" title="class in org.apache.solr.util">ConcurrentLFUCache.Stats</A></CODE></FONT></TD>
244 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#getStats()">getStats</A></B>()</CODE>
247 </TD>
249 <TR BGCOLOR="white" CLASS="TableRowColor">
250 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
251 <CODE> <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A></CODE></FONT></TD>
252 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#put(K, V)">put</A></B>(<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A> key,
253 <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A> val)</CODE>
256 </TD>
258 <TR BGCOLOR="white" CLASS="TableRowColor">
259 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260 <CODE> <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A></CODE></FONT></TD>
261 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#remove(K)">remove</A></B>(<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A> key)</CODE>
264 </TD>
266 <TR BGCOLOR="white" CLASS="TableRowColor">
267 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
268 <CODE> void</CODE></FONT></TD>
269 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#setAlive(boolean)">setAlive</A></B>(boolean live)</CODE>
272 </TD>
274 <TR BGCOLOR="white" CLASS="TableRowColor">
275 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
276 <CODE> int</CODE></FONT></TD>
277 <TD><CODE><B><A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html#size()">size</A></B>()</CODE>
280 </TD>
283 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
284 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
285 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
286 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
288 <TR BGCOLOR="white" CLASS="TableRowColor">
289 <TD><CODE><A HREF="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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></TD>
295 <!-- ========= CONSTRUCTOR DETAIL ======== -->
297 <A NAME="constructor_detail"><!-- --></A>
298 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
299 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
300 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
301 <B>Constructor Detail</B></FONT></TH>
305 <A NAME="ConcurrentLFUCache(int, int, int, int, boolean, boolean, org.apache.solr.util.ConcurrentLFUCache.EvictionListener, boolean)"><!-- --></A><H3>
306 ConcurrentLFUCache</H3>
308 public <B>ConcurrentLFUCache</B>(int upperWaterMark,
309 int lowerWaterMark,
310 int acceptableSize,
311 int initialSize,
312 boolean runCleanupThread,
313 boolean runNewThreadForCleanup,
314 <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="interface in org.apache.solr.util">ConcurrentLFUCache.EvictionListener</A><<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>> evictionListener,
315 boolean timeDecay)</PRE>
320 <A NAME="ConcurrentLFUCache(int, int)"><!-- --></A><H3>
321 ConcurrentLFUCache</H3>
323 public <B>ConcurrentLFUCache</B>(int size,
324 int lowerWatermark)</PRE>
328 <!-- ============ METHOD DETAIL ========== -->
330 <A NAME="method_detail"><!-- --></A>
331 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
332 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
333 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
334 <B>Method Detail</B></FONT></TH>
338 <A NAME="setAlive(boolean)"><!-- --></A><H3>
341 public void <B>setAlive</B>(boolean live)</PRE>
349 <A NAME="get(java.lang.Object)"><!-- --></A><A NAME="get(K)"><!-- --></A><H3>
352 public <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A> <B>get</B>(<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A> key)</PRE>
360 <A NAME="remove(java.lang.Object)"><!-- --></A><A NAME="remove(K)"><!-- --></A><H3>
363 public <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A> <B>remove</B>(<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A> key)</PRE>
371 <A NAME="put(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="put(K, V)"><!-- --></A><H3>
374 public <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A> <B>put</B>(<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A> key,
375 <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A> val)</PRE>
383 <A NAME="getLeastUsedItems(int)"><!-- --></A><H3>
384 getLeastUsedItems</H3>
386 public <A HREF="http://download.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/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>> <B>getLeastUsedItems</B>(int n)</PRE>
388 <DD>Returns 'n' number of least used entries present in this cache.
390 This uses a TreeSet to collect the 'n' least used items ordered by ascending hitcount
391 and returns a LinkedHashMap containing 'n' or less than 'n' entries.
394 <DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of items needed
395 <DT><B>Returns:</B><DD>a LinkedHashMap containing 'n' or less than 'n' entries</DL>
400 <A NAME="getMostUsedItems(int)"><!-- --></A><H3>
401 getMostUsedItems</H3>
403 public <A HREF="http://download.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/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>> <B>getMostUsedItems</B>(int n)</PRE>
405 <DD>Returns 'n' number of most used entries present in this cache.
407 This uses a TreeSet to collect the 'n' most used items ordered by descending hitcount
408 and returns a LinkedHashMap containing 'n' or less than 'n' entries.
411 <DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of items needed
412 <DT><B>Returns:</B><DD>a LinkedHashMap containing 'n' or less than 'n' entries</DL>
417 <A NAME="size()"><!-- --></A><H3>
420 public int <B>size</B>()</PRE>
428 <A NAME="clear()"><!-- --></A><H3>
431 public void <B>clear</B>()</PRE>
439 <A NAME="getMap()"><!-- --></A><H3>
442 public <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>,org.apache.solr.util.ConcurrentLFUCache.CacheEntry<<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">K</A>,<A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.html" title="type parameter in ConcurrentLFUCache">V</A>>> <B>getMap</B>()</PRE>
450 <A NAME="destroy()"><!-- --></A><H3>
453 public void <B>destroy</B>()</PRE>
461 <A NAME="getStats()"><!-- --></A><H3>
464 public <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.Stats.html" title="class in org.apache.solr.util">ConcurrentLFUCache.Stats</A> <B>getStats</B>()</PRE>
472 <A NAME="finalize()"><!-- --></A><H3>
475 protected void <B>finalize</B>()
476 throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></PRE>
479 <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
484 <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></CODE></DL>
487 <!-- ========= END OF CLASS DATA ========= -->
491 <!-- ======= START OF BOTTOM NAVBAR ====== -->
492 <A NAME="navbar_bottom"><!-- --></A>
493 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
494 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
496 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
497 <A NAME="navbar_bottom_firstrow"><!-- --></A>
498 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
499 <TR ALIGN="center" VALIGN="top">
500 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
501 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
502 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
503 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ConcurrentLFUCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
504 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
505 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
506 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
510 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
516 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
517 <A HREF="../../../../org/apache/solr/util/BoundedTreeSet.html" title="class in org.apache.solr.util"><B>PREV CLASS</B></A>
518 <A HREF="../../../../org/apache/solr/util/ConcurrentLFUCache.EvictionListener.html" title="interface in org.apache.solr.util"><B>NEXT CLASS</B></A></FONT></TD>
519 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
520 <A HREF="../../../../index.html?org/apache/solr/util/ConcurrentLFUCache.html" target="_top"><B>FRAMES</B></A>
521 <A HREF="ConcurrentLFUCache.html" target="_top"><B>NO FRAMES</B></A>
522 <SCRIPT type="text/javascript">
525 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
530 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
537 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
538 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
539 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
540 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
543 <A NAME="skip-navbar_bottom"></A>
544 <!-- ======== END OF BOTTOM NAVBAR ======= -->
548 <i>Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.</i>
549 <script src='../../../../prettify.js' type='text/javascript'></script>
550 <script type='text/javascript'>
552 var oldonload = window.onload;
553 if (typeof oldonload != 'function') {
554 window.onload = prettyPrint;
556 window.onload = function() {