| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_102) on Thu Jan 19 09:32:43 PST 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>MemoryMappedFile (com.yahoo.datasketches:memory 0.8.5-SNAPSHOT API)</title> |
| <meta name="date" content="2017-01-19"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MemoryMappedFile (com.yahoo.datasketches:memory 0.8.5-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../com/yahoo/memory/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MemoryMappedFile.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../com/yahoo/memory/Memory.html" title="interface in com.yahoo.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/yahoo/memory/MemoryRegion.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/yahoo/memory/MemoryMappedFile.html" target="_top">Frames</a></li> |
| <li><a href="MemoryMappedFile.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#fields.inherited.from.class.com.yahoo.memory.NativeMemory">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">com.yahoo.memory</div> |
| <h2 title="Class MemoryMappedFile" class="title">Class MemoryMappedFile</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../com/yahoo/memory/NativeMemory.html" title="class in com.yahoo.memory">com.yahoo.memory.NativeMemory</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>com.yahoo.memory.MemoryMappedFile</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../com/yahoo/memory/Memory.html" title="interface in com.yahoo.memory">Memory</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../com/yahoo/memory/AllocMemory.html" title="class in com.yahoo.memory">AllocMemory</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">MemoryMappedFile</span> |
| extends <a href="../../../com/yahoo/memory/NativeMemory.html" title="class in com.yahoo.memory">NativeMemory</a></pre> |
| <div class="block">MemoryMappedFile class extends NativeMemory and is used to memory map files (including those > |
| 2GB) off heap. It is the responsibility of the calling class to free the memory.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd>Praveenkumar Venkatesan</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.com.yahoo.memory.NativeMemory"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class com.yahoo.memory.<a href="../../../com/yahoo/memory/NativeMemory.html" title="class in com.yahoo.memory">NativeMemory</a></h3> |
| <code><a href="../../../com/yahoo/memory/NativeMemory.html#byteBuf_">byteBuf_</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#capacityBytes_">capacityBytes_</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#memArray_">memArray_</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#memReq_">memReq_</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#nativeRawStartAddress_">nativeRawStartAddress_</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#objectBaseOffset_">objectBaseOffset_</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/MemoryMappedFile.html#MemoryMappedFile-java.io.File-long-long-">MemoryMappedFile</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file, |
| long position, |
| long len)</code> |
| <div class="block">Constructor for memory mapping a file.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/MemoryMappedFile.html#finalize--">finalize</a></span>()</code> |
| <div class="block">If the JVM calls this method and a "freeMemory() has not been called" a <i>System.err</i> |
| message will be logged.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/MemoryMappedFile.html#force--">force</a></span>()</code> |
| <div class="block">Forces any changes made to this content to be written to the storage device containing the |
| mapped file.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/MemoryMappedFile.html#freeMemory--">freeMemory</a></span>()</code> |
| <div class="block">This frees this Memory only if it is required.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/MemoryMappedFile.html#isLoaded--">isLoaded</a></span>()</code> |
| <div class="block">Tells whether or not the content is resident in physical memory.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/MemoryMappedFile.html#load--">load</a></span>()</code> |
| <div class="block">Loads content into physical memory.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.com.yahoo.memory.NativeMemory"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class com.yahoo.memory.<a href="../../../com/yahoo/memory/NativeMemory.html" title="class in com.yahoo.memory">NativeMemory</a></h3> |
| <code><a href="../../../com/yahoo/memory/NativeMemory.html#addAndGetInt-long-int-">addAndGetInt</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#addAndGetLong-long-long-">addAndGetLong</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#array--">array</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#asReadOnlyMemory--">asReadOnlyMemory</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#byteBuffer--">byteBuffer</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#clear--">clear</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#clear-long-long-">clear</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#clearBits-long-byte-">clearBits</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#compareAndSwapInt-long-int-int-">compareAndSwapInt</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#compareAndSwapLong-long-long-long-">compareAndSwapLong</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#copy-long-long-long-">copy</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#copy-com.yahoo.memory.Memory-long-com.yahoo.memory.Memory-long-long-">copy</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#fill-byte-">fill</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#fill-long-long-byte-">fill</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getAddress-long-">getAddress</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getAndSetInt-long-int-">getAndSetInt</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getAndSetLong-long-long-">getAndSetLong</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getBoolean-long-">getBoolean</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getBooleanArray-long-boolean:A-int-int-">getBooleanArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getByte-long-">getByte</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getByteArray-long-byte:A-int-int-">getByteArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getCapacity--">getCapacity</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getChar-long-">getChar</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getCharArray-long-char:A-int-int-">getCharArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getCumulativeOffset-long-">getCumulativeOffset</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getDouble-long-">getDouble</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getDoubleArray-long-double:A-int-int-">getDoubleArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getFloat-long-">getFloat</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getFloatArray-long-float:A-int-int-">getFloatArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getInt-long-">getInt</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getIntArray-long-int:A-int-int-">getIntArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getLong-long-">getLong</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getLongArray-long-long:A-int-int-">getLongArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getMemoryRequest--">getMemoryRequest</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getNativeMemory--">getNativeMemory</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getParent--">getParent</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getShort-long-">getShort</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#getShortArray-long-short:A-int-int-">getShortArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#hasArray--">hasArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#hasByteBuffer--">hasByteBuffer</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isAllBitsClear-long-byte-">isAllBitsClear</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isAllBitsSet-long-byte-">isAllBitsSet</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isAllocated--">isAllocated</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isAnyBitsClear-long-byte-">isAnyBitsClear</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isAnyBitsSet-long-byte-">isAnyBitsSet</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isDirect--">isDirect</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#isReadOnly--">isReadOnly</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putBoolean-long-boolean-">putBoolean</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putBooleanArray-long-boolean:A-int-int-">putBooleanArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putByte-long-byte-">putByte</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putByteArray-long-byte:A-int-int-">putByteArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putChar-long-char-">putChar</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putCharArray-long-char:A-int-int-">putCharArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putDouble-long-double-">putDouble</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putDoubleArray-long-double:A-int-int-">putDoubleArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putFloat-long-float-">putFloat</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putFloatArray-long-float:A-int-int-">putFloatArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putInt-long-int-">putInt</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putIntArray-long-int:A-int-int-">putIntArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putLong-long-long-">putLong</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putLongArray-long-long:A-int-int-">putLongArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putShort-long-short-">putShort</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#putShortArray-long-short:A-int-int-">putShortArray</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#requiresFree--">requiresFree</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#setBits-long-byte-">setBits</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#setMemoryRequest-com.yahoo.memory.MemoryRequest-">setMemoryRequest</a>, <a href="../../../com/yahoo/memory/NativeMemory.html#toHexString-java.lang.String-long-int-">toHexString</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="MemoryMappedFile-java.io.File-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>MemoryMappedFile</h4> |
| <pre>public MemoryMappedFile(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file, |
| long position, |
| long len) |
| throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Constructor for memory mapping a file. |
| |
| <p> |
| Memory maps a file directly in off heap leveraging native map0 method used in |
| FileChannelImpl.c. The owner will have read write access to that address space. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - - File to be mapped</dd> |
| <dd><code>position</code> - - memory map starting from this position in the file</dd> |
| <dd><code>len</code> - - Memory map at most len bytes > 0 starting from <code>position</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - file not found or RuntimeException, etc.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="load--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>load</h4> |
| <pre>public void load()</pre> |
| <div class="block">Loads content into physical memory. This method makes a best effort to ensure that, when it |
| returns, this buffer's content is resident in physical memory. Invoking this method may cause |
| some number of page faults and I/O operations to occur.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html#load--"> |
| java/nio/MappedByteBuffer.load</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isLoaded--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isLoaded</h4> |
| <pre>public boolean isLoaded()</pre> |
| <div class="block">Tells whether or not the content is resident in physical memory. A return value of true implies |
| that it is highly likely that all of the data in this buffer is resident in physical memory and |
| may therefore be accessed without incurring any virtual-memory page faults or I/O operations. A |
| return value of false does not necessarily imply that the content is not resident in physical |
| memory. The returned value is a hint, rather than a guarantee, because the underlying operating |
| system may have paged out some of the buffer's data by the time that an invocation of this |
| method returns.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if loaded</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href= |
| "https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html#isLoaded--"> java |
| /nio/MappedByteBuffer.isLoaded</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="force--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>force</h4> |
| <pre>public void force()</pre> |
| <div class="block">Forces any changes made to this content to be written to the storage device containing the |
| mapped file. |
| |
| <p> |
| If the file mapped into this buffer resides on a local storage device then when this method |
| returns it is guaranteed that all changes made to the buffer since it was created, or since |
| this method was last invoked, will have been written to that device. |
| </p> |
| |
| <p> |
| If the file does not reside on a local device then no such guarantee is made. |
| </p> |
| |
| <p> |
| If this buffer was not mapped in read/write mode |
| (java.nio.channels.FileChannel.MapMode.READ_WRITE) then invoking this method has no effect. |
| </p></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href= |
| "https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html#force--"> java/ |
| nio/MappedByteBuffer.force</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="freeMemory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>freeMemory</h4> |
| <pre>public void freeMemory()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../com/yahoo/memory/NativeMemory.html#freeMemory--">NativeMemory</a></code></span></div> |
| <div class="block">This frees this Memory only if it is required. This always sets the capacity to zero |
| and the reference to MemoryRequest to null, which effectively disables this instance. |
| |
| <p>It is always safe to call this method when you are done with this class.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../com/yahoo/memory/NativeMemory.html#freeMemory--">freeMemory</a></code> in class <code><a href="../../../com/yahoo/memory/NativeMemory.html" title="class in com.yahoo.memory">NativeMemory</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="finalize--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>finalize</h4> |
| <pre>protected void finalize()</pre> |
| <div class="block">If the JVM calls this method and a "freeMemory() has not been called" a <i>System.err</i> |
| message will be logged.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a></code> in class <code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../com/yahoo/memory/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MemoryMappedFile.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../com/yahoo/memory/Memory.html" title="interface in com.yahoo.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/yahoo/memory/MemoryRegion.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/yahoo/memory/MemoryMappedFile.html" target="_top">Frames</a></li> |
| <li><a href="MemoryMappedFile.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#fields.inherited.from.class.com.yahoo.memory.NativeMemory">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2015–2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p> |
| </body> |
| </html> |