📄 defaultcache.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#containsValue(java.lang.Object)">containsValue</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#cullCache()">cullCache</A></B>()</CODE><BR> Removes objects from cache if the cache is too full.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#deleteExpiredEntries()">deleteExpiredEntries</A></B>()</CODE><BR> Clears all entries out of cache where the entries are older than the maximum defined age.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.Entry.html" title="class or interface in java.util">Map.Entry</A><<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A>>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#entrySet()">entrySet</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#get(java.lang.Object)">get</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> key)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#getCacheHits()">getCacheHits</A></B>()</CODE><BR> Returns the number of cache hits.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#getCacheMisses()">getCacheMisses</A></B>()</CODE><BR> Returns the number of cache misses.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#getCacheSize()">getCacheSize</A></B>()</CODE><BR> Returns the size of the cache contents in bytes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#getMaxCacheSize()">getMaxCacheSize</A></B>()</CODE><BR> Returns the maximum size of the cache (in bytes).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#getMaxLifetime()">getMaxLifetime</A></B>()</CODE><BR> Returns the maximum number of milleseconds that any object can live in cache.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#getName()">getName</A></B>()</CODE><BR> Returns the name of this cache.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#isEmpty()">isEmpty</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">K</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#keySet()">keySet</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#put(K, V)">put</A></B>(<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">K</A> key, <A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A> value)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#putAll(java.util.Map)">putAll</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><? extends <A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">K</A>,? extends <A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A>> map)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#remove(java.lang.Object)">remove</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> key)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#setMaxCacheSize(int)">setMaxCacheSize</A></B>(int maxCacheSize)</CODE><BR> Sets the maximum size of the cache.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#setMaxLifetime(long)">setMaxLifetime</A></B>(long maxLifetime)</CODE><BR> Sets the maximum number of milleseconds that any object can live in cache.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#setName(java.lang.String)">setName</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE><BR> Sets the name of this cache.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#size()">size</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html#values()">values</A></B>()</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.util.Map"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#hashCode()" title="class or interface in java.util">hashCode</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="map"><!-- --></A><H3>map</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">K</A>,org.jivesoftware.util.cache.DefaultCache.CacheObject<<A HREF="../../../../org/jivesoftware/util/cache/DefaultCache.html" title="type parameter in DefaultCache">V</A>>> <B>map</B></PRE><DL><DD>The map the keys and values are stored in.<P><DL></DL></DL><HR><A NAME="lastAccessedList"><!-- --></A><H3>lastAccessedList</H3><PRE>protected <A HREF="../../../../org/jivesoftware/util/LinkedList.html" title="class in org.jivesoftware.util">LinkedList</A> <B>lastAccessedList</B></PRE><DL><DD>Linked list to maintain order that cache objects are accessed in, most used to least used.<P><DL></DL></DL><HR><A NAME="ageList"><!-- --></A><H3>ageList</H3><PRE>protected <A HREF="../../../../org/jivesoftware/util/LinkedList.html" title="class in org.jivesoftware.util">LinkedList</A> <B>ageList</B></PRE><DL><DD>Linked list to maintain time that cache objects were initially added to the cache, most recently added to oldest added.<P><DL></DL></DL><HR><A NAME="maxLifetime"><!-- --></A><H3>maxLifetime</H3><PRE>protected long <B>maxLifetime</B></PRE><DL><DD>Maximum length of time objects can exist in cache before expiring.<P><DL></DL></DL><HR><A NAME="cacheHits"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -