cloudstack/thirdparty/ehcache/docs/net/sf/ehcache/Statistics.html

701 lines
27 KiB
HTML
Executable File

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_13) on Sun Jul 13 13:05:39 EST 2008 -->
<TITLE>
Statistics (ehcache)
</TITLE>
<META NAME="keywords" CONTENT="net.sf.ehcache.Statistics class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Statistics (ehcache)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Statistics.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<a href="/" target="_top">ehcache</a></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../net/sf/ehcache/Status.html" title="class in net.sf.ehcache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/sf/ehcache/Statistics.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Statistics.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sf.ehcache</FONT>
<BR>
Class Statistics</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>net.sf.ehcache.Statistics</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>Statistics</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>
</PRE>
<P>
An immutable Cache statistics implementation}
<p/>
This is like a value object, with the added ability to clear cache statistics on the cache.
That ability does not survive any Serialization of this class. On deserialization the cache
can be considered disconnected.
<p/>
The accuracy of these statistics are determined by the value of {#getStatisticsAccuracy()}
at the time the statistic was computed. This can be changed by setting <A HREF="../../../net/sf/ehcache/Cache.html#setStatisticsAccuracy(int)"><CODE>Cache.setStatisticsAccuracy(int)</CODE></A>.
<p/>
Because this class maintains a reference to an Ehcache, any references held to this class will precent the Ehcache
from getting garbage collected.
<p/>
The <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>STATISTICS_ACCURACY_GUARANTEED</CODE></A> and <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>STATISTICS_ACCURACY_NONE</CODE></A>
constants have the same values as in JSR107.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: Statistics.java 704 2008-07-13 00:17:52Z gregluck $</DD>
<DT><B>Author:</B></DT>
<DD>Greg Luck</DD>
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#net.sf.ehcache.Statistics">Serialized Form</A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT">STATISTICS_ACCURACY_BEST_EFFORT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Best efforts accuracy setting.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED">STATISTICS_ACCURACY_GUARANTEED</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Guaranteed accuracy setting.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE">STATISTICS_ACCURACY_NONE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fast but not accurate setting.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#Statistics(net.sf.ehcache.Ehcache, int, long, long, long, long, long, float, long)">Statistics</A></B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache,
int&nbsp;statisticsAccuracy,
long&nbsp;cacheHits,
long&nbsp;onDiskHits,
long&nbsp;inMemoryHits,
long&nbsp;misses,
long&nbsp;size,
float&nbsp;averageGetTime,
long&nbsp;evictionCount)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new statistics object, associated with a Cache</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#clearStatistics()">clearStatistics</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the statistic counters to 0 for the associated Cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getAssociatedCache()">getAssociatedCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getAssociatedCacheName()">getAssociatedCacheName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getAverageGetTime()">getAverageGetTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The average get time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getCacheHits()">getCacheHits</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number of times a requested item was found in the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getCacheMisses()">getCacheMisses</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getEvictionCount()">getEvictionCount</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of cache evictions, since the cache was created, or statistics were cleared.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getInMemoryHits()">getInMemoryHits</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of times a requested item was found in the Memory Store.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getObjectCount()">getObjectCount</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of elements stored in the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getOnDiskHits()">getOnDiskHits</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of times a requested item was found in the Disk Store.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getStatisticsAccuracy()">getStatisticsAccuracy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accurately measuring statistics can be expensive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#getStatisticsAccuracyDescription()">getStatisticsAccuracyDescription</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accurately measuring statistics can be expensive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/sf/ehcache/Statistics.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <CODE>String</CODE> representation of the <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A> statistics.</TD>
</TR>
</TABLE>
&nbsp;<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.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<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="STATISTICS_ACCURACY_NONE"><!-- --></A><H3>
STATISTICS_ACCURACY_NONE</H3>
<PRE>
public static final int <B>STATISTICS_ACCURACY_NONE</B></PRE>
<DL>
<DD>Fast but not accurate setting.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.sf.ehcache.Statistics.STATISTICS_ACCURACY_NONE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STATISTICS_ACCURACY_BEST_EFFORT"><!-- --></A><H3>
STATISTICS_ACCURACY_BEST_EFFORT</H3>
<PRE>
public static final int <B>STATISTICS_ACCURACY_BEST_EFFORT</B></PRE>
<DL>
<DD>Best efforts accuracy setting.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.sf.ehcache.Statistics.STATISTICS_ACCURACY_BEST_EFFORT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STATISTICS_ACCURACY_GUARANTEED"><!-- --></A><H3>
STATISTICS_ACCURACY_GUARANTEED</H3>
<PRE>
public static final int <B>STATISTICS_ACCURACY_GUARANTEED</B></PRE>
<DL>
<DD>Guaranteed accuracy setting.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.sf.ehcache.Statistics.STATISTICS_ACCURACY_GUARANTEED">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Statistics(net.sf.ehcache.Ehcache, int, long, long, long, long, long, float, long)"><!-- --></A><H3>
Statistics</H3>
<PRE>
public <B>Statistics</B>(<A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A>&nbsp;cache,
int&nbsp;statisticsAccuracy,
long&nbsp;cacheHits,
long&nbsp;onDiskHits,
long&nbsp;inMemoryHits,
long&nbsp;misses,
long&nbsp;size,
float&nbsp;averageGetTime,
long&nbsp;evictionCount)</PRE>
<DL>
<DD>Creates a new statistics object, associated with a Cache
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cache</CODE> - The cache that <A HREF="../../../net/sf/ehcache/Statistics.html#clearStatistics()"><CODE>clearStatistics()</CODE></A> will call, if not disconnected<DD><CODE>statisticsAccuracy</CODE> - <DD><CODE>cacheHits</CODE> - <DD><CODE>onDiskHits</CODE> - <DD><CODE>inMemoryHits</CODE> - <DD><CODE>misses</CODE> - <DD><CODE>size</CODE> - </DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_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>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="clearStatistics()"><!-- --></A><H3>
clearStatistics</H3>
<PRE>
public void <B>clearStatistics</B>()</PRE>
<DL>
<DD>Clears the statistic counters to 0 for the associated Cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheHits()"><!-- --></A><H3>
getCacheHits</H3>
<PRE>
public long <B>getCacheHits</B>()</PRE>
<DL>
<DD>The number of times a requested item was found in the cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of times a requested item was found in the cache</DL>
</DD>
</DL>
<HR>
<A NAME="getInMemoryHits()"><!-- --></A><H3>
getInMemoryHits</H3>
<PRE>
public long <B>getInMemoryHits</B>()</PRE>
<DL>
<DD>Number of times a requested item was found in the Memory Store.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of times a requested item was found in memory</DL>
</DD>
</DL>
<HR>
<A NAME="getOnDiskHits()"><!-- --></A><H3>
getOnDiskHits</H3>
<PRE>
public long <B>getOnDiskHits</B>()</PRE>
<DL>
<DD>Number of times a requested item was found in the Disk Store.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of times a requested item was found on Disk, or 0 if there is no disk storage configured.</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheMisses()"><!-- --></A><H3>
getCacheMisses</H3>
<PRE>
public long <B>getCacheMisses</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of times a requested element was not found in the cache</DL>
</DD>
</DL>
<HR>
<A NAME="getObjectCount()"><!-- --></A><H3>
getObjectCount</H3>
<PRE>
public long <B>getObjectCount</B>()</PRE>
<DL>
<DD>Gets the number of elements stored in the cache. Caclulating this can be expensive. Accordingly,
this method will return three different values, depending on the statistics accuracy setting.
<h3>Best Effort Size</h3>
This result is returned when the statistics accuracy setting is <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>.
<p/>
The size is the number of <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>s in the <A HREF="../../../net/sf/ehcache/store/MemoryStore.html" title="class in net.sf.ehcache.store"><CODE>MemoryStore</CODE></A> plus
the number of <A HREF="../../../net/sf/ehcache/Element.html" title="class in net.sf.ehcache"><CODE>Element</CODE></A>s in the <A HREF="../../../net/sf/ehcache/store/DiskStore.html" title="class in net.sf.ehcache.store"><CODE>DiskStore</CODE></A>.
<p/>
This number is the actual number of elements, including expired elements that have
not been removed. Any duplicates between stores are accounted for.
<p/>
Expired elements are removed from the the memory store when
getting an expired element, or when attempting to spool an expired element to
disk.
<p/>
Expired elements are removed from the disk store when getting an expired element,
or when the expiry thread runs, which is once every five minutes.
<p/>
<h3>Guaranteed Accuracy Size</h3>
This result is returned when the statistics accuracy setting is <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>STATISTICS_ACCURACY_GUARANTEED</CODE></A>.
<p/>
This method accounts for elements which might be expired or duplicated between stores. It take approximately
200ms per 1000 elements to execute.
<h3>Fast but non-accurate Size</h3>
This result is returned when the statistics accuracy setting is <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>STATISTICS_ACCURACY_NONE</CODE></A>.
<p/>
The number given may contain expired elements. In addition if the DiskStore is used it may contain some double
counting of elements. It takes 6ms for 1000 elements to execute. Time to execute is O(log n). 50,000 elements take
36ms.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of elements in the ehcache, with a varying degree of accuracy, depending on accuracy setting.</DL>
</DD>
</DL>
<HR>
<A NAME="getStatisticsAccuracy()"><!-- --></A><H3>
getStatisticsAccuracy</H3>
<PRE>
public int <B>getStatisticsAccuracy</B>()</PRE>
<DL>
<DD>Accurately measuring statistics can be expensive. Returns the current accuracy setting.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>one of <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>STATISTICS_ACCURACY_GUARANTEED</CODE></A>, <A HREF="../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>STATISTICS_ACCURACY_NONE</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getStatisticsAccuracyDescription()"><!-- --></A><H3>
getStatisticsAccuracyDescription</H3>
<PRE>
public java.lang.String <B>getStatisticsAccuracyDescription</B>()</PRE>
<DL>
<DD>Accurately measuring statistics can be expensive. Returns the current accuracy setting.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a human readable description of the accuracy setting. One of "None", "Best Effort" or "Guaranteed".</DL>
</DD>
</DL>
<HR>
<A NAME="getAssociatedCacheName()"><!-- --></A><H3>
getAssociatedCacheName</H3>
<PRE>
public java.lang.String <B>getAssociatedCacheName</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the Ehcache, or null if a reference is no longer held to the cache,
as, it would be after deserialization.</DL>
</DD>
</DL>
<HR>
<A NAME="getAssociatedCache()"><!-- --></A><H3>
getAssociatedCache</H3>
<PRE>
public <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> <B>getAssociatedCache</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the Ehcache, or null if a reference is no longer held to the cache,
as, it would be after deserialization.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public final java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a <CODE>String</CODE> representation of the <A HREF="../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache"><CODE>Ehcache</CODE></A> statistics.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getAverageGetTime()"><!-- --></A><H3>
getAverageGetTime</H3>
<PRE>
public float <B>getAverageGetTime</B>()</PRE>
<DL>
<DD>The average get time. Because ehcache support JDK1.4.2, each get time uses
System.currentTimeMilis, rather than nanoseconds. The accuracy is thus limited.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getEvictionCount()"><!-- --></A><H3>
getEvictionCount</H3>
<PRE>
public long <B>getEvictionCount</B>()</PRE>
<DL>
<DD>Gets the number of cache evictions, since the cache was created, or statistics were cleared.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Statistics.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<a href="/" target="_top">ehcache</a></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../net/sf/ehcache/ObjectExistsException.html" title="class in net.sf.ehcache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../net/sf/ehcache/Status.html" title="class in net.sf.ehcache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/sf/ehcache/Statistics.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Statistics.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>