📄 memorymonitor.html
字号:
<BR> Removes a <code>Listener</code> from the <code>MemoryMonitor</code>.</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="../../mondrian/util/MemoryMonitor.html#updateListenerThreshold(mondrian.util.MemoryMonitor.Listener, int)">updateListenerThreshold</A></B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A> listener, int percentage)</CODE><BR> Changes the threshold percentage of a given <code>Listener</code>.</TD></TR></TABLE> <P><!-- ============ 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="addListener(mondrian.util.MemoryMonitor.Listener, int)"><!-- --></A><H3>addListener</H3><PRE>boolean <B>addListener</B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A> listener, int thresholdPercentage)</PRE><DL><DD>Adds a <code>Listener</code> to the <code>MemoryMonitor</code> with a given threshold percentage. <p>If the threshold is below the Java5 memory managment system's threshold, then the Listener is notified from within this method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the <code>Listener</code> to be added.<DD><CODE>thresholdPercentage</CODE> - the threshold percentage for this <code>Listener</code>.<DT><B>Returns:</B><DD><code>true</code> if the <code>Listener</code> was added and <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="addListener(mondrian.util.MemoryMonitor.Listener)"><!-- --></A><H3>addListener</H3><PRE>boolean <B>addListener</B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A> listener)</PRE><DL><DD>Adds a <code>Listener</code> using the default threshold percentage. <p>If the threshold is below the Java5 memory managment system's threshold, then the Listener is notified from within this method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the <code>Listener</code> to be added.<DT><B>Returns:</B><DD><code>true</code> if the <code>Listener</code> was added and <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="updateListenerThreshold(mondrian.util.MemoryMonitor.Listener, int)"><!-- --></A><H3>updateListenerThreshold</H3><PRE>void <B>updateListenerThreshold</B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A> listener, int percentage)</PRE><DL><DD>Changes the threshold percentage of a given <code>Listener</code>. <p>If the new value is below the system's current value, then the <code>Listener</code> will have its notification callback called while in this method - so a client should always check if its notification method was called immediately after calling this method. <p>This method can be used if, for example, an algorithm has different approaches that result in different memory usage profiles; one, large memory but fast and a second which is low-memory but slow. The algorithm starts with the large memory approach, receives a low memory notification, switches to the low memory approach and changes when it should be notified for this new approach. The first approach need to be notified at a lower percentage because it uses lots of memory, possibly quickly; while the second approach, possibly a file based algorithm, has smaller memory requirements and uses memory less quickly thus one can live with a higher notification threshold percentage.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the <code>Listener</code> being updated.<DD><CODE>percentage</CODE> - new percentage threshold.</DL></DD></DL><HR><A NAME="removeListener(mondrian.util.MemoryMonitor.Listener)"><!-- --></A><H3>removeListener</H3><PRE>boolean <B>removeListener</B>(<A HREF="../../mondrian/util/MemoryMonitor.Listener.html" title="interface in mondrian.util">MemoryMonitor.Listener</A> listener)</PRE><DL><DD>Removes a <code>Listener</code> from the <code>MemoryMonitor</code>. Returns <code>true</code> if listener was removed and <code>false</code> otherwise.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to be removed<DT><B>Returns:</B><DD><code>true</code> if listener was removed.</DL></DD></DL><HR><A NAME="removeAllListener()"><!-- --></A><H3>removeAllListener</H3><PRE>void <B>removeAllListener</B>()</PRE><DL><DD>Clear out all <code>Listener</code>s and turnoff JVM memory notification.<P><DD><DL></DL></DD></DL><HR><A NAME="getMaxMemory()"><!-- --></A><H3>getMaxMemory</H3><PRE>long <B>getMaxMemory</B>()</PRE><DL><DD>Returns the maximum memory usage.<P><DD><DL><DT><B>Returns:</B><DD>the maximum memory usage.</DL></DD></DL><HR><A NAME="getUsedMemory()"><!-- --></A><H3>getUsedMemory</H3><PRE>long <B>getUsedMemory</B>()</PRE><DL><DD>Returns the current memory used.<P><DD><DL><DT><B>Returns:</B><DD>the current memory used.</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="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="http://sourceforge.net/projects/mondrian"><img src="http://sourceforge.net/sflogo.php?group_id=35302&type=1" width="88" height="31" border="0" alt="SourceForge.net_Logo"></a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../mondrian/util/FormatTest.html" title="class in mondrian.util"><B>PREV CLASS</B></A> <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> <A HREF="MemoryMonitor.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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -