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

📄 memorymonitor.html

📁 基于mondrian 开源框架进行OLAP多维分析
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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_15) on Thu Jul 31 17:20:17 EDT 2008 --><TITLE>MemoryMonitor (Mondrian OLAP Server, version 3.0.4.11371)</TITLE><META NAME="keywords" CONTENT="mondrian.util.MemoryMonitor interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="MemoryMonitor (Mondrian OLAP Server, version 3.0.4.11371)";}</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="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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../mondrian/util/FormatTest.html" title="class in mondrian.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?mondrian/util/MemoryMonitor.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="MemoryMonitor.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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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">mondrian.util</FONT><BR>Interface MemoryMonitor</H2><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../mondrian/util/AbstractMemoryMonitor.html" title="class in mondrian.util">AbstractMemoryMonitor</A>, <A HREF="../../mondrian/util/FauxMemoryMonitor.html" title="class in mondrian.util">FauxMemoryMonitor</A>, <A HREF="../../mondrian/util/MemoryMonitorTest.TestMM.html" title="class in mondrian.util">MemoryMonitorTest.TestMM</A>, <A HREF="../../mondrian/util/MemoryMonitorTest.TestMM2.html" title="class in mondrian.util">MemoryMonitorTest.TestMM2</A>, <A HREF="../../mondrian/util/NotificationMemoryMonitor.html" title="class in mondrian.util">NotificationMemoryMonitor</A></DD></DL><HR><DL><DT><PRE>public interface <B>MemoryMonitor</B></DL></PRE><P>API for Mondrian's memory monitors. <p>For Java4, the available monitors do nothing since there is no reliable way of detecting that memory is running low using such a JVM (you are welcome to try to create one, but I believe you will fail - some such candidates only make it more likely that an OutOfMemory condition will occur). <p>For Java5 one can optionally enable a monitor which is based upon the Java5 memory classes locate in java.lang.management. <p>A client must implement the <code>MemoryMonitor.Listener</code> interface and register with the <code>MemoryMonitor</code>. <p>The <code>MemoryMonitor</code> supports having multiple <code>Listener</code> clients. The clients can have the same threshold percentage or different values. The threshold percentage value is used by the <code>MemoryMonitor</code> to determine when to notify a client. It is the percentage of the total memory: <blockquote> <code> 100 * free-memory / total-memory (0 &le; free-memory &le; total-memory). </code> </blockquote><P><P><DL><DT><B>Since:</B></DT>  <DD>Feb 01 2007</DD><DT><B>Version:</B></DT>  <DD>$Id: //open/mondrian-release/3.0/src/main/mondrian/util/MemoryMonitor.java#2 $</DD><DT><B>Author:</B></DT>  <DD>Richard M. Emberson</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_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>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;interface</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A <code>MemoryMonitor</code> client implements the <code>Listener</code> interface and registers with the <code>MemoryMonitor</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;interface</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/util/MemoryMonitor.Test.html" title="interface in mondrian.util">MemoryMonitor.Test</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is an interface that a <code>MemoryMonitor</code> may optionally implement.</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;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/util/MemoryMonitor.html#addListener(mondrian.util.MemoryMonitor.Listener)">addListener</A></B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <code>Listener</code> using the default threshold percentage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/util/MemoryMonitor.html#addListener(mondrian.util.MemoryMonitor.Listener, int)">addListener</A></B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A>&nbsp;listener,            int&nbsp;thresholdPercentage)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <code>Listener</code> to the <code>MemoryMonitor</code> with a given threshold percentage.</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="../../mondrian/util/MemoryMonitor.html#getMaxMemory()">getMaxMemory</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum memory usage.</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="../../mondrian/util/MemoryMonitor.html#getUsedMemory()">getUsedMemory</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current memory used.</TD></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="../../mondrian/util/MemoryMonitor.html#removeAllListener()">removeAllListener</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear out all <code>Listener</code>s and turnoff JVM memory notification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/util/MemoryMonitor.html#removeListener(mondrian.util.MemoryMonitor.Listener)">removeListener</A></B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A>&nbsp;listener)</CODE>

⌨️ 快捷键说明

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