⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cachewrapper.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</DL><HR><A NAME="getName()"><!-- --></A><H3>getName</H3><PRE>public <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> <B>getName</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getName()">Cache</A></CODE></B></DD><DD>Returns the name of the cache.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getName()">getName</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the name of the cache.</DL></DD></DL><HR><A NAME="setName(java.lang.String)"><!-- --></A><H3>setName</H3><PRE>public void <B>setName</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>&nbsp;name)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#setName(java.lang.String)">Cache</A></CODE></B></DD><DD>Sets the name of the cache<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#setName(java.lang.String)">setName</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the cache</DL></DD></DL><HR><A NAME="getMaxCacheSize()"><!-- --></A><H3>getMaxCacheSize</H3><PRE>public long <B>getMaxCacheSize</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getMaxCacheSize()">Cache</A></CODE></B></DD><DD>Returns the maximum size of the cache in bytes. If the cache grows larger than the max size, the least frequently used items will be removed. If the max cache size is set to -1, there is no size limit.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getMaxCacheSize()">getMaxCacheSize</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the maximum size of the cache in bytes.</DL></DD></DL><HR><A NAME="setMaxCacheSize(int)"><!-- --></A><H3>setMaxCacheSize</H3><PRE>public void <B>setMaxCacheSize</B>(int&nbsp;maxSize)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#setMaxCacheSize(int)">Cache</A></CODE></B></DD><DD>Sets the maximum size of the cache in bytes. If the cache grows larger than the max size, the least frequently used items will be removed. If the max cache size is set to -1, there is no size limit.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#setMaxCacheSize(int)">setMaxCacheSize</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>maxSize</CODE> - the maximum size of the cache in bytes.</DL></DD></DL><HR><A NAME="getMaxLifetime()"><!-- --></A><H3>getMaxLifetime</H3><PRE>public long <B>getMaxLifetime</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getMaxLifetime()">Cache</A></CODE></B></DD><DD>Returns the maximum number of milliseconds that any object can live in cache. Once the specified number of milliseconds passes, the object will be automatically expried from cache. If the max lifetime is set to -1, then objects never expire.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getMaxLifetime()">getMaxLifetime</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the maximum number of milliseconds before objects are expired.</DL></DD></DL><HR><A NAME="setMaxLifetime(long)"><!-- --></A><H3>setMaxLifetime</H3><PRE>public void <B>setMaxLifetime</B>(long&nbsp;maxLifetime)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#setMaxLifetime(long)">Cache</A></CODE></B></DD><DD>Sets the maximum number of milliseconds that any object can live in cache. Once the specified number of milliseconds passes, the object will be automatically expried from cache. If the max lifetime is set to -1, then objects never expire.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#setMaxLifetime(long)">setMaxLifetime</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>maxLifetime</CODE> - the maximum number of milliseconds before objects are expired.</DL></DD></DL><HR><A NAME="getCacheSize()"><!-- --></A><H3>getCacheSize</H3><PRE>public int <B>getCacheSize</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getCacheSize()">Cache</A></CODE></B></DD><DD>Returns the size of the cache contents in bytes. This value is only a rough approximation, so cache users should expect that actual VM memory used by the cache could be significantly higher than the value reported by this method.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getCacheSize()">getCacheSize</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the size of the cache contents in bytes.</DL></DD></DL><HR><A NAME="getCacheHits()"><!-- --></A><H3>getCacheHits</H3><PRE>public long <B>getCacheHits</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getCacheHits()">Cache</A></CODE></B></DD><DD>Returns the number of cache hits. A cache hit occurs every time the get method is called and the cache contains the requested object.<p> Keeping track of cache hits and misses lets one measure how efficient the cache is; the higher the percentage of hits, the more efficient.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getCacheHits()">getCacheHits</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of cache hits.</DL></DD></DL><HR><A NAME="getCacheMisses()"><!-- --></A><H3>getCacheMisses</H3><PRE>public long <B>getCacheMisses</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getCacheMisses()">Cache</A></CODE></B></DD><DD>Returns the number of cache misses. A cache miss occurs every time the get method is called and the cache does not contain the requested object.<p> Keeping track of cache hits and misses lets one measure how efficient the cache is; the higher the percentage of hits, the more efficient.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html#getCacheMisses()">getCacheMisses</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of cache hits.</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#size()" title="class or interface in java.util">size</A></CODE> in interface <CODE><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>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><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>&lt;<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">K</A>,<A HREF="../../../../org/jivesoftware/util/cache/CacheWrapper.html" title="type parameter in CacheWrapper">V</A>&gt;</CODE></DL></DD><DD><DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -