mirror of https://github.com/apache/cloudstack.git
566 lines
25 KiB
HTML
Executable File
566 lines
25 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:43 EST 2008 -->
|
|
<TITLE>
|
|
CacheStatistics (ehcache)
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="net.sf.ehcache.management.CacheStatistics class">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="CacheStatistics (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> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheStatistics.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
|
|
<A HREF="../../../../net/sf/ehcache/management/CacheMBean.html" title="interface in net.sf.ehcache.management"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../index.html?net/sf/ehcache/management/CacheStatistics.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="CacheStatistics.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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.management</FONT>
|
|
<BR>
|
|
Class CacheStatistics</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.ehcache.management.CacheStatistics</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>CacheStatistics</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A JMX CacheStatistics decorator for an ehcache Statistics class.
|
|
<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>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Since:</B></DT>
|
|
<DD>1.3</DD>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$Id: CacheStatistics.java 560 2007-11-13 10:54:59Z gregluck $</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Greg Luck</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ======== 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/management/CacheStatistics.html#CacheStatistics(net.sf.ehcache.Ehcache)">CacheStatistics</A></B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> ehcache)</CODE>
|
|
|
|
<BR>
|
|
Constructs an object from an ehcache statistics object</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== 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> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#clearStatistics()">clearStatistics</A></B>()</CODE>
|
|
|
|
<BR>
|
|
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>(package private) static javax.management.ObjectName</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#createObjectName(java.lang.String, java.lang.String)">createObjectName</A></B>(java.lang.String cacheManagerName,
|
|
java.lang.String cacheName)</CODE>
|
|
|
|
<BR>
|
|
Creates an object name using the scheme "net.sf.ehcache:type=CacheStatistics,CacheManager=<cacheManagerName>,name=<cacheName>"</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#getAssociatedCacheName()">getAssociatedCacheName</A></B>()</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="../../../../net/sf/ehcache/management/CacheStatistics.html#getCacheHits()">getCacheHits</A></B>()</CODE>
|
|
|
|
<BR>
|
|
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> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#getCacheMisses()">getCacheMisses</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Warning.</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="../../../../net/sf/ehcache/management/CacheStatistics.html#getInMemoryHits()">getInMemoryHits</A></B>()</CODE>
|
|
|
|
<BR>
|
|
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> long</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#getObjectCount()">getObjectCount</A></B>()</CODE>
|
|
|
|
<BR>
|
|
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>(package private) javax.management.ObjectName</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#getObjectName()">getObjectName</A></B>()</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="../../../../net/sf/ehcache/management/CacheStatistics.html#getOnDiskHits()">getOnDiskHits</A></B>()</CODE>
|
|
|
|
<BR>
|
|
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> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#getStatisticsAccuracy()">getStatisticsAccuracy</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Accurately measuring statistics can be expensive.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../../net/sf/ehcache/management/CacheStatistics.html#getStatisticsAccuracyDescription()">getStatisticsAccuracyDescription</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Accurately measuring statistics can be expensive.</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.Object</B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= 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="CacheStatistics(net.sf.ehcache.Ehcache)"><!-- --></A><H3>
|
|
CacheStatistics</H3>
|
|
<PRE>
|
|
public <B>CacheStatistics</B>(<A HREF="../../../../net/sf/ehcache/Ehcache.html" title="interface in net.sf.ehcache">Ehcache</A> ehcache)</PRE>
|
|
<DL>
|
|
<DD>Constructs an object from an ehcache statistics object
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ehcache</CODE> - the backing ehcache</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="createObjectName(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
|
createObjectName</H3>
|
|
<PRE>
|
|
static javax.management.ObjectName <B>createObjectName</B>(java.lang.String cacheManagerName,
|
|
java.lang.String cacheName)</PRE>
|
|
<DL>
|
|
<DD>Creates an object name using the scheme "net.sf.ehcache:type=CacheStatistics,CacheManager=<cacheManagerName>,name=<cacheName>"
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</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 used
|
|
in the creation of these statistics.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getStatisticsAccuracy()">getStatisticsAccuracy</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>one of <A HREF="../../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_BEST_EFFORT"><CODE>Statistics.STATISTICS_ACCURACY_BEST_EFFORT</CODE></A>, <A HREF="../../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_GUARANTEED"><CODE>Statistics.STATISTICS_ACCURACY_GUARANTEED</CODE></A>, <A HREF="../../../../net/sf/ehcache/Statistics.html#STATISTICS_ACCURACY_NONE"><CODE>Statistics.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>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getStatisticsAccuracyDescription()">getStatisticsAccuracyDescription</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getAssociatedCacheName()">getAssociatedCacheName</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the name of the Ehcache, or null is there no associated cache</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<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>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#clearStatistics()">clearStatistics</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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/>
|
|
Warning. This statistic is recorded as a long. If the statistic is large than Integer#MAX_VALUE
|
|
precision will be lost.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getCacheHits()">getCacheHits</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getInMemoryHits()">getInMemoryHits</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getOnDiskHits()">getOnDiskHits</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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>Warning. This statistic is recorded as a long. If the statistic is large than Integer#MAX_VALUE
|
|
precision will be lost.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getCacheMisses()">getCacheMisses</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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.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.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.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>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html#getObjectCount()">getObjectCount</A></CODE> in interface <CODE><A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management">CacheStatisticsMBean</A></CODE></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="getObjectName()"><!-- --></A><H3>
|
|
getObjectName</H3>
|
|
<PRE>
|
|
javax.management.ObjectName <B>getObjectName</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the object name for this MBean</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> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheStatistics.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
|
|
<A HREF="../../../../net/sf/ehcache/management/CacheMBean.html" title="interface in net.sf.ehcache.management"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../../net/sf/ehcache/management/CacheStatisticsMBean.html" title="interface in net.sf.ehcache.management"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../index.html?net/sf/ehcache/management/CacheStatistics.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="CacheStatistics.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|