| <!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_162) on Tue Dec 04 17:15:14 PST 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>WritableMemory (com.yahoo.datasketches:memory 0.12.1 API)</title> |
| <meta name="date" content="2018-12-04"> |
| <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="WritableMemory (com.yahoo.datasketches:memory 0.12.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":6,"i5":6,"i6":10,"i7":6,"i8":6,"i9":6,"i10":6,"i11":10,"i12":10,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":9,"i24":9,"i25":9,"i26":9,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":9,"i39":9,"i40":6,"i41":6,"i42":6,"i43":6,"i44":6,"i45":6,"i46":6,"i47":6,"i48":6,"i49":6,"i50":6,"i51":6,"i52":6,"i53":6,"i54":6,"i55":6,"i56":6,"i57":6,"i58":10,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":6,"i72":6,"i73":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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="../../../overview-summary.html">Overview</a></li> |
| <li><a href="../../../com/yahoo/memory/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/WritableMemory.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/WritableMapHandle.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/yahoo/memory/WritableMemory.html" target="_top">Frames</a></li> |
| <li><a href="WritableMemory.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>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 WritableMemory" class="title">Class WritableMemory</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://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/Memory.html" title="class in com.yahoo.memory">com.yahoo.memory.Memory</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>com.yahoo.memory.WritableMemory</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">WritableMemory</span> |
| extends <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></pre> |
| <div class="block">Provides read and write primitive and primitive array access to any of the four resources |
| mentioned at the package level.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd>Roman Leventov, Lee Rhodes</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#allocate-int-">allocate</a></span>(int capacityBytes)</code> |
| <div class="block">Creates on-heap WritableMemory with the given capacity and the native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#allocate-int-java.nio.ByteOrder-">allocate</a></span>(int capacityBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">Creates on-heap WritableMemory with the given capacity and the given byte order.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableDirectHandle.html" title="class in com.yahoo.memory">WritableDirectHandle</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#allocateDirect-long-">allocateDirect</a></span>(long capacityBytes)</code> |
| <div class="block">Allocates and provides access to capacityBytes directly in native (off-heap) memory |
| leveraging the WritableMemory API.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableDirectHandle.html" title="class in com.yahoo.memory">WritableDirectHandle</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#allocateDirect-long-com.yahoo.memory.MemoryRequestServer-">allocateDirect</a></span>(long capacityBytes, |
| <a href="../../../com/yahoo/memory/MemoryRequestServer.html" title="interface in com.yahoo.memory">MemoryRequestServer</a> memReqSvr)</code> |
| <div class="block">Allocates and provides access to capacityBytes directly in native (off-heap) memory |
| leveraging the WritableMemory API.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#asWritableBuffer--">asWritableBuffer</a></span>()</code> |
| <div class="block">Returns a new <i>WritableBuffer</i> with a writable view of this object.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#asWritableBuffer-java.nio.ByteOrder-">asWritableBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">Returns a new <i>WritableBuffer</i> with a writable view of this object |
| with the given byte order.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#checkValidAndBounds-long-long-">checkValidAndBounds</a></span>(long offsetBytes, |
| long lengthBytes)</code> |
| <div class="block">Checks that the specified range of bytes is within bounds of this object, throws |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if it's not: i.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#clear--">clear</a></span>()</code> |
| <div class="block">Clears all bytes of this Memory to zero</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#clear-long-long-">clear</a></span>(long offsetBytes, |
| long lengthBytes)</code> |
| <div class="block">Clears a portion of this Memory to zero.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#clearBits-long-byte-">clearBits</a></span>(long offsetBytes, |
| byte bitMask)</code> |
| <div class="block">Clears the bits defined by the bitMask</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#compareAndSwapLong-long-long-long-">compareAndSwapLong</a></span>(long offsetBytes, |
| long expect, |
| long update)</code> |
| <div class="block">Atomically sets the current value at the memory location to the given updated value |
| if and only if the current value <code>==</code> the expected value.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#equals-java.lang.Object-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> that)</code> |
| <div class="block">Returns true if the given object is an instance of this class and has equal data contents.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#equalTo-long-java.lang.Object-long-long-">equalTo</a></span>(long thisOffsetBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> that, |
| long thatOffsetBytes, |
| long lengthBytes)</code> |
| <div class="block">Returns true if the given object is an instance of this class and has equal contents to |
| this object in the given range of bytes.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#fill-byte-">fill</a></span>(byte value)</code> |
| <div class="block">Fills all bytes of this Memory region to the given byte value.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#fill-long-long-byte-">fill</a></span>(long offsetBytes, |
| long lengthBytes, |
| byte value)</code> |
| <div class="block">Fills a portion of this Memory region to the given byte value.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>abstract long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getAndAddLong-long-long-">getAndAddLong</a></span>(long offsetBytes, |
| long delta)</code> |
| <div class="block">Atomically adds the given value to the long located at offsetBytes.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>abstract long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getAndSetLong-long-long-">getAndSetLong</a></span>(long offsetBytes, |
| long newValue)</code> |
| <div class="block">Atomically exchanges the given value with the current value located at offsetBytes.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getArray--">getArray</a></span>()</code> |
| <div class="block">Returns the primitive backing array, otherwise null.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getByteBuffer--">getByteBuffer</a></span>()</code> |
| <div class="block">Gets the backing ByteBuffer if it exists, otherwise returns null.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getByteOrder--">getByteOrder</a></span>()</code> |
| <div class="block">Gets the current ByteOrder.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCapacity--">getCapacity</a></span>()</code> |
| <div class="block">Gets the capacity of this object in bytes</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCumulativeOffset--">getCumulativeOffset</a></span>()</code> |
| <div class="block">Gets the cumulative offset in bytes of this object from the backing resource.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCumulativeOffset-long-">getCumulativeOffset</a></span>(long offsetBytes)</code> |
| <div class="block">Gets the cumulative offset in bytes of this object from the backing resource including the given |
| offsetBytes.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCurrentDirectMemoryAllocated--">getCurrentDirectMemoryAllocated</a></span>()</code> |
| <div class="block">Gets the current size of active direct memory allocated.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCurrentDirectMemoryAllocations--">getCurrentDirectMemoryAllocations</a></span>()</code> |
| <div class="block">Gets the current number of active direct memory allocations.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCurrentDirectMemoryMapAllocated--">getCurrentDirectMemoryMapAllocated</a></span>()</code> |
| <div class="block">Gets the current size of active direct memory map allocated.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getCurrentDirectMemoryMapAllocations--">getCurrentDirectMemoryMapAllocations</a></span>()</code> |
| <div class="block">Gets the current number of active direct memory map allocations.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../com/yahoo/memory/MemoryRequestServer.html" title="interface in com.yahoo.memory">MemoryRequestServer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getMemoryRequestServer--">getMemoryRequestServer</a></span>()</code> |
| <div class="block">For Direct Memory only.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getRegionOffset--">getRegionOffset</a></span>()</code> |
| <div class="block">Returns the offset of address zero of this object relative to the address zero of the |
| backing resource but not including the size of any Java object header.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getRegionOffset-long-">getRegionOffset</a></span>(long offsetBytes)</code> |
| <div class="block">Returns the offset of address zero of this object relative to the address zero of the |
| backing resource plus the given offsetBytes but not including the size of any Java object |
| header.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#hasArray--">hasArray</a></span>()</code> |
| <div class="block">Returns true if this object is backed by an on-heap primitive array</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#hasByteBuffer--">hasByteBuffer</a></span>()</code> |
| <div class="block">Returns true if this Memory is backed by a ByteBuffer.</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#hashCode--">hashCode</a></span>()</code> |
| <div class="block">Returns the hashCode of this object.</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#isDirect--">isDirect</a></span>()</code> |
| <div class="block">Returns true if the backing resource is direct (off-heap) memory.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#isNativeOrder--">isNativeOrder</a></span>()</code> |
| <div class="block">Returns true if the current byte order is native order.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#isReadOnly--">isReadOnly</a></span>()</code> |
| <div class="block">Returns true if this object or the backing resource is read-only.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#isSameResource-java.lang.Object-">isSameResource</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> that)</code> |
| <div class="block">Returns true if the backing resource of <i>this</i> is identical with the backing resource |
| of <i>that</i>.</div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#isValid--">isValid</a></span>()</code> |
| <div class="block">Returns true if this object is valid and has not been closed.</div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMapHandle.html" title="class in com.yahoo.memory">WritableMapHandle</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#map-java.io.File-">map</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file)</code> |
| <div class="block">Maps the entire given file into native-ordered Memory for write operations |
| (including those > 2GB).</div> |
| </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMapHandle.html" title="class in com.yahoo.memory">WritableMapHandle</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#map-java.io.File-long-long-java.nio.ByteOrder-">map</a></span>(<a href="https://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 fileOffsetBytes, |
| long capacityBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">Maps the specified portion of the given file into Memory for write operations |
| (including those > 2GB).</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putBoolean-long-boolean-">putBoolean</a></span>(long offsetBytes, |
| boolean value)</code> |
| <div class="block">Puts the boolean value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putBooleanArray-long-boolean:A-int-int-">putBooleanArray</a></span>(long offsetBytes, |
| boolean[] srcArray, |
| int srcOffsetBooleans, |
| int lengthBooleans)</code> |
| <div class="block">Puts the boolean array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putByte-long-byte-">putByte</a></span>(long offsetBytes, |
| byte value)</code> |
| <div class="block">Puts the byte value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i43" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putByteArray-long-byte:A-int-int-">putByteArray</a></span>(long offsetBytes, |
| byte[] srcArray, |
| int srcOffsetBytes, |
| int lengthBytes)</code> |
| <div class="block">Puts the byte array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i44" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putChar-long-char-">putChar</a></span>(long offsetBytes, |
| char value)</code> |
| <div class="block">Puts the char value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i45" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putCharArray-long-char:A-int-int-">putCharArray</a></span>(long offsetBytes, |
| char[] srcArray, |
| int srcOffsetChars, |
| int lengthChars)</code> |
| <div class="block">Puts the char array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i46" class="altColor"> |
| <td class="colFirst"><code>abstract long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putCharsToUtf8-long-java.lang.CharSequence-">putCharsToUtf8</a></span>(long offsetBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> src)</code> |
| <div class="block">Encodes characters from the given CharSequence into UTF-8 bytes and puts them into this |
| <i>WritableMemory</i> begining at the given offsetBytes.</div> |
| </td> |
| </tr> |
| <tr id="i47" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putDouble-long-double-">putDouble</a></span>(long offsetBytes, |
| double value)</code> |
| <div class="block">Puts the double value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i48" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putDoubleArray-long-double:A-int-int-">putDoubleArray</a></span>(long offsetBytes, |
| double[] srcArray, |
| int srcOffsetDoubles, |
| int lengthDoubles)</code> |
| <div class="block">Puts the double array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i49" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putFloat-long-float-">putFloat</a></span>(long offsetBytes, |
| float value)</code> |
| <div class="block">Puts the float value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i50" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putFloatArray-long-float:A-int-int-">putFloatArray</a></span>(long offsetBytes, |
| float[] srcArray, |
| int srcOffsetFloats, |
| int lengthFloats)</code> |
| <div class="block">Puts the float array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i51" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putInt-long-int-">putInt</a></span>(long offsetBytes, |
| int value)</code> |
| <div class="block">Puts the int value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i52" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putIntArray-long-int:A-int-int-">putIntArray</a></span>(long offsetBytes, |
| int[] srcArray, |
| int srcOffsetInts, |
| int lengthInts)</code> |
| <div class="block">Puts the int array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i53" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putLong-long-long-">putLong</a></span>(long offsetBytes, |
| long value)</code> |
| <div class="block">Puts the long value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i54" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putLongArray-long-long:A-int-int-">putLongArray</a></span>(long offsetBytes, |
| long[] srcArray, |
| int srcOffsetLongs, |
| int lengthLongs)</code> |
| <div class="block">Puts the long array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i55" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putShort-long-short-">putShort</a></span>(long offsetBytes, |
| short value)</code> |
| <div class="block">Puts the short value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i56" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#putShortArray-long-short:A-int-int-">putShortArray</a></span>(long offsetBytes, |
| short[] srcArray, |
| int srcOffsetShorts, |
| int lengthShorts)</code> |
| <div class="block">Puts the short array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i57" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#setBits-long-byte-">setBits</a></span>(long offsetBytes, |
| byte bitMask)</code> |
| <div class="block">Sets the bits defined by the bitMask</div> |
| </td> |
| </tr> |
| <tr id="i58" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#toHexString-java.lang.String-long-int-">toHexString</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> header, |
| long offsetBytes, |
| int lengthBytes)</code> |
| <div class="block">Returns a formatted hex string of a range of this object.</div> |
| </td> |
| </tr> |
| <tr id="i59" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-boolean:A-">wrap</a></span>(boolean[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i60" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-byte:A-">wrap</a></span>(byte[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i61" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-byte:A-java.nio.ByteOrder-">wrap</a></span>(byte[] arr, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">Wraps the given primitive array for write operations with the given byte order.</div> |
| </td> |
| </tr> |
| <tr id="i62" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-byte:A-int-int-java.nio.ByteOrder-">wrap</a></span>(byte[] arr, |
| int offsetBytes, |
| int lengthBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">Wraps the given primitive array for write operations with the given byte order.</div> |
| </td> |
| </tr> |
| <tr id="i63" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-java.nio.ByteBuffer-">wrap</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> byteBuf)</code> |
| <div class="block">Accesses the given ByteBuffer for write operations.</div> |
| </td> |
| </tr> |
| <tr id="i64" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-java.nio.ByteBuffer-java.nio.ByteOrder-">wrap</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> byteBuf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">Accesses the given ByteBuffer for write operations.</div> |
| </td> |
| </tr> |
| <tr id="i65" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-char:A-">wrap</a></span>(char[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i66" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-double:A-">wrap</a></span>(double[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i67" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-float:A-">wrap</a></span>(float[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i68" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-int:A-">wrap</a></span>(int[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i69" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-long:A-">wrap</a></span>(long[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i70" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#wrap-short:A-">wrap</a></span>(short[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order.</div> |
| </td> |
| </tr> |
| <tr id="i71" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#writableRegion-long-long-">writableRegion</a></span>(long offsetBytes, |
| long capacityBytes)</code> |
| <div class="block">A writable region is a writable view of this object.</div> |
| </td> |
| </tr> |
| <tr id="i72" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#writableRegion-long-long-java.nio.ByteOrder-">writableRegion</a></span>(long offsetBytes, |
| long capacityBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</code> |
| <div class="block">A writable region is a writable view of this object.</div> |
| </td> |
| </tr> |
| <tr id="i73" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#xxHash64-long-long-long-">xxHash64</a></span>(long offsetBytes, |
| long lengthBytes, |
| long seed)</code> |
| <div class="block">Returns the 64-bit hash of the sequence of bytes in this object specified by |
| <i>offsetBytes</i>, <i>lengthBytes</i> and a <i>seed</i>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.com.yahoo.memory.Memory"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class com.yahoo.memory.<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></h3> |
| <code><a href="../../../com/yahoo/memory/Memory.html#asBuffer--">asBuffer</a>, <a href="../../../com/yahoo/memory/Memory.html#asBuffer-java.nio.ByteOrder-">asBuffer</a>, <a href="../../../com/yahoo/memory/Memory.html#compareTo-long-long-com.yahoo.memory.Memory-long-long-">compareTo</a>, <a href="../../../com/yahoo/memory/Memory.html#copyTo-long-com.yahoo.memory.WritableMemory-long-long-">copyTo</a>, <a href="../../../com/yahoo/memory/Memory.html#getBoolean-long-">getBoolean</a>, <a href="../../../com/yahoo/memory/Memory.html#getBooleanArray-long-boolean:A-int-int-">getBooleanArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getByte-long-">getByte</a>, <a href="../../../com/yahoo/memory/Memory.html#getByteArray-long-byte:A-int-int-">getByteArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getChar-long-">getChar</a>, <a href="../../../com/yahoo/memory/Memory.html#getCharArray-long-char:A-int-int-">getCharArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getCharsFromUtf8-long-int-java.lang.Appendable-">getCharsFromUtf8</a>, <a href="../../../com/yahoo/memory/Memory.html#getCharsFromUtf8-long-int-java.lang.StringBuilder-">getCharsFromUtf8</a>, <a href="../../../com/yahoo/memory/Memory.html#getDouble-long-">getDouble</a>, <a href="../../../com/yahoo/memory/Memory.html#getDoubleArray-long-double:A-int-int-">getDoubleArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getFloat-long-">getFloat</a>, <a href="../../../com/yahoo/memory/Memory.html#getFloatArray-long-float:A-int-int-">getFloatArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getInt-long-">getInt</a>, <a href="../../../com/yahoo/memory/Memory.html#getIntArray-long-int:A-int-int-">getIntArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getLong-long-">getLong</a>, <a href="../../../com/yahoo/memory/Memory.html#getLongArray-long-long:A-int-int-">getLongArray</a>, <a href="../../../com/yahoo/memory/Memory.html#getShort-long-">getShort</a>, <a href="../../../com/yahoo/memory/Memory.html#getShortArray-long-short:A-int-int-">getShortArray</a>, <a href="../../../com/yahoo/memory/Memory.html#region-long-long-">region</a>, <a href="../../../com/yahoo/memory/Memory.html#region-long-long-java.nio.ByteOrder-">region</a>, <a href="../../../com/yahoo/memory/Memory.html#unsafeByteBufferView-long-int-">unsafeByteBufferView</a>, <a href="../../../com/yahoo/memory/Memory.html#writeTo-long-long-java.nio.channels.WritableByteChannel-">writeTo</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="https://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="https://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="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://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="https://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="https://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="https://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="https://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="https://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="https://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"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="wrap-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> byteBuf)</pre> |
| <div class="block">Accesses the given ByteBuffer for write operations. The returned WritableMemory object has |
| the same byte order, as the given ByteBuffer, unless the capacity of the given ByteBuffer is |
| zero, then byte order of the returned WritableMemory object, as well as backing storage and |
| read-only status are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteBuf</code> - the given ByteBuffer</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given ByteBuffer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-java.nio.ByteBuffer-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> byteBuf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</pre> |
| <div class="block">Accesses the given ByteBuffer for write operations. The returned WritableMemory object has |
| the given byte order, ignoring the byte order of the given ByteBuffer. If the capacity of |
| the given ByteBuffer is zero the byte order of the returned WritableMemory object |
| (as well as backing storage) is unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteBuf</code> - the given ByteBuffer, must not be null</dd> |
| <dd><code>byteOrder</code> - the byte order to be used, which may be independent of the byte order |
| state of the given ByteBuffer</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given ByteBuffer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="map-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>map</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMapHandle.html" title="class in com.yahoo.memory">WritableMapHandle</a> map(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Maps the entire given file into native-ordered Memory for write operations |
| (including those > 2GB). Calling this method is equivalent to calling |
| <a href="../../../com/yahoo/memory/WritableMemory.html#map-java.io.File-long-long-java.nio.ByteOrder-"><code>map(file, 0, file.length(), ByteOrder.nativeOrder())</code></a>. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.map(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - the given file to map</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>WritableMapHandle for managing the mapped Memory</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - file not found or a RuntimeException.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="map-java.io.File-long-long-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>map</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMapHandle.html" title="class in com.yahoo.memory">WritableMapHandle</a> map(<a href="https://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 fileOffsetBytes, |
| long capacityBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Maps the specified portion of the given file into Memory for write operations |
| (including those > 2GB). |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.map(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - the given file to map. It may not be null.</dd> |
| <dd><code>fileOffsetBytes</code> - the position in the given file in bytes. It may not be negative.</dd> |
| <dd><code>capacityBytes</code> - the size of the mapped Memory. It may not be negative or zero.</dd> |
| <dd><code>byteOrder</code> - the byte order to be used for the given file. It may not be null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>WritableMapHandle for managing the mapped Memory</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - file not found or RuntimeException, etc.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocateDirect-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocateDirect</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableDirectHandle.html" title="class in com.yahoo.memory">WritableDirectHandle</a> allocateDirect(long capacityBytes)</pre> |
| <div class="block">Allocates and provides access to capacityBytes directly in native (off-heap) memory |
| leveraging the WritableMemory API. Native byte order is assumed. |
| The allocated memory will be 8-byte aligned, but may not be page aligned. |
| If capacityBytes is zero, byte order, backing storage and read-only status |
| of the WritableMemory object, returned from <a href="../../../com/yahoo/memory/WritableHandle.html#get--"><code>WritableHandle.get()</code></a> are unspecified. |
| |
| <p>The default MemoryRequestServer, which allocates any request for memory onto the heap, |
| will be used.</p> |
| |
| <p><b>NOTE:</b> Native/Direct memory acquired using Unsafe may have garbage in it. |
| It is the responsibility of the using class to clear this memory, if required, |
| and to call <i>close()</i> when done.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>capacityBytes</code> - the size of the desired memory in bytes.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>WritableDirectHandle for this off-heap resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocateDirect-long-com.yahoo.memory.MemoryRequestServer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocateDirect</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableDirectHandle.html" title="class in com.yahoo.memory">WritableDirectHandle</a> allocateDirect(long capacityBytes, |
| <a href="../../../com/yahoo/memory/MemoryRequestServer.html" title="interface in com.yahoo.memory">MemoryRequestServer</a> memReqSvr)</pre> |
| <div class="block">Allocates and provides access to capacityBytes directly in native (off-heap) memory |
| leveraging the WritableMemory API. The allocated memory will be 8-byte aligned, but may not |
| be page aligned. If capacityBytes is zero, byte order, backing storage and read-only status |
| of the WritableMemory object, returned from <a href="../../../com/yahoo/memory/WritableHandle.html#get--"><code>WritableHandle.get()</code></a> are unspecified. |
| |
| <p><b>NOTE:</b> Native/Direct memory acquired using Unsafe may have garbage in it. |
| It is the responsibility of the using class to clear this memory, if required, |
| and to call <i>close()</i> when done.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>capacityBytes</code> - the size of the desired memory in bytes.</dd> |
| <dd><code>memReqSvr</code> - A user-specified MemoryRequestServer. |
| This is a callback mechanism for a user client of direct memory to request more memory.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>WritableHandle for this off-heap resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writableRegion-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writableRegion</h4> |
| <pre>public abstract <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> writableRegion(long offsetBytes, |
| long capacityBytes)</pre> |
| <div class="block">A writable region is a writable view of this object. |
| This returns a new <i>WritableMemory</i> representing the defined writable region with the |
| given offsetBytes and capacityBytes. |
| <ul> |
| <li>Returned object's origin = this objects' origin + <i>offsetBytes</i></li> |
| <li>Returned object's capacity = <i>capacityBytes</i></li> |
| </ul> |
| If the given capacityBytes is zero, the returned object is effectively immutable and |
| the backing storage and byte order are unspecified.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - the starting offset with respect to this object.</dd> |
| <dd><code>capacityBytes</code> - the capacity of the returned object in bytes.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new <i>WritableMemory</i> representing the defined writable region.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writableRegion-long-long-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writableRegion</h4> |
| <pre>public abstract <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> writableRegion(long offsetBytes, |
| long capacityBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</pre> |
| <div class="block">A writable region is a writable view of this object. |
| This returns a new <i>WritableMemory</i> representing the defined writable region with the |
| given offsetBytes, capacityBytes and byte order. |
| <ul> |
| <li>Returned object's origin = this objects' origin + <i>offsetBytes</i></li> |
| <li>Returned object's capacity = <i>capacityBytes</i></li> |
| <li>Returned object's byte order = <i>byteOrder</i></li> |
| </ul> |
| If the given capacityBytes is zero, the returned object is effectively immutable and |
| the backing storage and byte order are unspecified.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - the starting offset with respect to this object.</dd> |
| <dd><code>capacityBytes</code> - the capacity of the returned object in bytes.</dd> |
| <dd><code>byteOrder</code> - the given byte order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new <i>WritableMemory</i> representing the defined writable region.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="asWritableBuffer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>asWritableBuffer</h4> |
| <pre>public abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a> asWritableBuffer()</pre> |
| <div class="block">Returns a new <i>WritableBuffer</i> with a writable view of this object. |
| <ul> |
| <li>Returned object's origin = this object's origin</li> |
| <li>Returned object's <i>start</i> = 0</li> |
| <li>Returned object's <i>position</i> = 0</li> |
| <li>Returned object's <i>end</i> = this object's capacity</li> |
| <li>Returned object's <i>capacity</i> = this object's capacity</li> |
| <li>Returned object's <i>start</i>, <i>position</i> and <i>end</i> are mutable</li> |
| </ul> |
| If this object's capacity is zero, the returned object is effectively immutable and |
| the backing storage and byte order are unspecified.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new <i>WritableBuffer</i> with a view of this WritableMemory</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="asWritableBuffer-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>asWritableBuffer</h4> |
| <pre>public abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a> asWritableBuffer(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</pre> |
| <div class="block">Returns a new <i>WritableBuffer</i> with a writable view of this object |
| with the given byte order. |
| <ul> |
| <li>Returned object's origin = this object's origin</li> |
| <li>Returned object's <i>start</i> = 0</li> |
| <li>Returned object's <i>position</i> = 0</li> |
| <li>Returned object's <i>end</i> = this object's capacity</li> |
| <li>Returned object's <i>capacity</i> = this object's capacity</li> |
| <li>Returned object's <i>start</i>, <i>position</i> and <i>end</i> are mutable</li> |
| </ul> |
| If this object's capacity is zero, the returned object is effectively immutable and |
| the backing storage and byte order are unspecified.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteOrder</code> - the given byte order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new <i>WritableBuffer</i> with a view of this WritableMemory</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocate-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocate</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> allocate(int capacityBytes)</pre> |
| <div class="block">Creates on-heap WritableMemory with the given capacity and the native byte order. If the given |
| capacityBytes is zero, backing storage, byte order and read-only status of the returned |
| WritableMemory object are unspecified.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>capacityBytes</code> - the given capacity in bytes.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on a new byte array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocate-int-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocate</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> allocate(int capacityBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</pre> |
| <div class="block">Creates on-heap WritableMemory with the given capacity and the given byte order. If the given |
| capacityBytes is zero, backing storage, byte order and read-only status of the returned |
| WritableMemory object are unspecified.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>capacityBytes</code> - the given capacity in bytes.</dd> |
| <dd><code>byteOrder</code> - the given byte order to allocate new Memory object with.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on a new byte array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-boolean:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(boolean[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(byte[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-byte:A-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(byte[] arr, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</pre> |
| <div class="block">Wraps the given primitive array for write operations with the given byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dd><code>byteOrder</code> - the byte order to be used</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-byte:A-int-int-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(byte[] arr, |
| int offsetBytes, |
| int lengthBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> byteOrder)</pre> |
| <div class="block">Wraps the given primitive array for write operations with the given byte order. If the given |
| lengthBytes is zero, backing storage, byte order and read-only status of the returned |
| WritableMemory object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dd><code>offsetBytes</code> - the byte offset into the given array</dd> |
| <dd><code>lengthBytes</code> - the number of bytes to include from the given array</dd> |
| <dd><code>byteOrder</code> - the byte order to be used</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-char:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(char[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-short:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(short[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-int:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(int[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-long:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(long[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-float:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(float[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="wrap-double:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>wrap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> wrap(double[] arr)</pre> |
| <div class="block">Wraps the given primitive array for write operations assuming native byte order. If the array |
| size is zero, backing storage, byte order and read-only status of the returned WritableMemory |
| object are unspecified. |
| |
| <p><b>Note:</b> Always qualify this method with the class name, e.g., |
| <i>WritableMemory.wrap(...)</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>arr</code> - the given primitive array.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new WritableMemory for write operations on the given primitive array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putBoolean-long-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putBoolean</h4> |
| <pre>public abstract void putBoolean(long offsetBytes, |
| boolean value)</pre> |
| <div class="block">Puts the boolean value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putBooleanArray-long-boolean:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putBooleanArray</h4> |
| <pre>public abstract void putBooleanArray(long offsetBytes, |
| boolean[] srcArray, |
| int srcOffsetBooleans, |
| int lengthBooleans)</pre> |
| <div class="block">Puts the boolean array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetBooleans</code> - offset in array units</dd> |
| <dd><code>lengthBooleans</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putByte-long-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putByte</h4> |
| <pre>public abstract void putByte(long offsetBytes, |
| byte value)</pre> |
| <div class="block">Puts the byte value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putByteArray-long-byte:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putByteArray</h4> |
| <pre>public abstract void putByteArray(long offsetBytes, |
| byte[] srcArray, |
| int srcOffsetBytes, |
| int lengthBytes)</pre> |
| <div class="block">Puts the byte array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetBytes</code> - offset in array units</dd> |
| <dd><code>lengthBytes</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putChar-long-char-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putChar</h4> |
| <pre>public abstract void putChar(long offsetBytes, |
| char value)</pre> |
| <div class="block">Puts the char value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putCharArray-long-char:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putCharArray</h4> |
| <pre>public abstract void putCharArray(long offsetBytes, |
| char[] srcArray, |
| int srcOffsetChars, |
| int lengthChars)</pre> |
| <div class="block">Puts the char array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetChars</code> - offset in array units</dd> |
| <dd><code>lengthChars</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putCharsToUtf8-long-java.lang.CharSequence-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putCharsToUtf8</h4> |
| <pre>public abstract long putCharsToUtf8(long offsetBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> src)</pre> |
| <div class="block">Encodes characters from the given CharSequence into UTF-8 bytes and puts them into this |
| <i>WritableMemory</i> begining at the given offsetBytes. |
| This is specifically designed to reduce the production of intermediate objects (garbage), |
| thus significantly reducing pressure on the JVM Garbage Collector.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>src</code> - The source CharSequence to be encoded and put into this WritableMemory. It is |
| the responsibility of the caller to provide sufficient capacity in this |
| <i>WritableMemory</i> for the encoded Utf8 bytes. Characters outside the ASCII range can |
| require 2, 3 or 4 bytes per character to encode.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of bytes encoded</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putDouble-long-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putDouble</h4> |
| <pre>public abstract void putDouble(long offsetBytes, |
| double value)</pre> |
| <div class="block">Puts the double value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putDoubleArray-long-double:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putDoubleArray</h4> |
| <pre>public abstract void putDoubleArray(long offsetBytes, |
| double[] srcArray, |
| int srcOffsetDoubles, |
| int lengthDoubles)</pre> |
| <div class="block">Puts the double array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetDoubles</code> - offset in array units</dd> |
| <dd><code>lengthDoubles</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putFloat-long-float-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putFloat</h4> |
| <pre>public abstract void putFloat(long offsetBytes, |
| float value)</pre> |
| <div class="block">Puts the float value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putFloatArray-long-float:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putFloatArray</h4> |
| <pre>public abstract void putFloatArray(long offsetBytes, |
| float[] srcArray, |
| int srcOffsetFloats, |
| int lengthFloats)</pre> |
| <div class="block">Puts the float array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetFloats</code> - offset in array units</dd> |
| <dd><code>lengthFloats</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putInt-long-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putInt</h4> |
| <pre>public abstract void putInt(long offsetBytes, |
| int value)</pre> |
| <div class="block">Puts the int value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putIntArray-long-int:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putIntArray</h4> |
| <pre>public abstract void putIntArray(long offsetBytes, |
| int[] srcArray, |
| int srcOffsetInts, |
| int lengthInts)</pre> |
| <div class="block">Puts the int array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetInts</code> - offset in array units</dd> |
| <dd><code>lengthInts</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putLong-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putLong</h4> |
| <pre>public abstract void putLong(long offsetBytes, |
| long value)</pre> |
| <div class="block">Puts the long value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putLongArray-long-long:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putLongArray</h4> |
| <pre>public abstract void putLongArray(long offsetBytes, |
| long[] srcArray, |
| int srcOffsetLongs, |
| int lengthLongs)</pre> |
| <div class="block">Puts the long array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetLongs</code> - offset in array units</dd> |
| <dd><code>lengthLongs</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putShort-long-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putShort</h4> |
| <pre>public abstract void putShort(long offsetBytes, |
| short value)</pre> |
| <div class="block">Puts the short value at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>value</code> - the value to put</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putShortArray-long-short:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putShortArray</h4> |
| <pre>public abstract void putShortArray(long offsetBytes, |
| short[] srcArray, |
| int srcOffsetShorts, |
| int lengthShorts)</pre> |
| <div class="block">Puts the short array at the given offset</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this <i>WritableMemory</i> start</dd> |
| <dd><code>srcArray</code> - The source array.</dd> |
| <dd><code>srcOffsetShorts</code> - offset in array units</dd> |
| <dd><code>lengthShorts</code> - number of array units to transfer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAndAddLong-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAndAddLong</h4> |
| <pre>public abstract long getAndAddLong(long offsetBytes, |
| long delta)</pre> |
| <div class="block">Atomically adds the given value to the long located at offsetBytes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd> |
| <dd><code>delta</code> - the amount to add</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the the previous value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="compareAndSwapLong-long-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareAndSwapLong</h4> |
| <pre>public abstract boolean compareAndSwapLong(long offsetBytes, |
| long expect, |
| long update)</pre> |
| <div class="block">Atomically sets the current value at the memory location to the given updated value |
| if and only if the current value <code>==</code> the expected value.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd> |
| <dd><code>expect</code> - the expected value</dd> |
| <dd><code>update</code> - the new value</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if successful. False return indicates that |
| the current value at the memory location was not equal to the expected value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAndSetLong-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAndSetLong</h4> |
| <pre>public abstract long getAndSetLong(long offsetBytes, |
| long newValue)</pre> |
| <div class="block">Atomically exchanges the given value with the current value located at offsetBytes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd> |
| <dd><code>newValue</code> - new value</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the previous value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getArray--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getArray</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getArray()</pre> |
| <div class="block">Returns the primitive backing array, otherwise null.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the primitive backing array, otherwise null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clear--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clear</h4> |
| <pre>public abstract void clear()</pre> |
| <div class="block">Clears all bytes of this Memory to zero</div> |
| </li> |
| </ul> |
| <a name="clear-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clear</h4> |
| <pre>public abstract void clear(long offsetBytes, |
| long lengthBytes)</pre> |
| <div class="block">Clears a portion of this Memory to zero.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd> |
| <dd><code>lengthBytes</code> - the length in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clearBits-long-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clearBits</h4> |
| <pre>public abstract void clearBits(long offsetBytes, |
| byte bitMask)</pre> |
| <div class="block">Clears the bits defined by the bitMask</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start.</dd> |
| <dd><code>bitMask</code> - the bits set to one will be cleared</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="fill-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fill</h4> |
| <pre>public abstract void fill(byte value)</pre> |
| <div class="block">Fills all bytes of this Memory region to the given byte value.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - the given byte value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="fill-long-long-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fill</h4> |
| <pre>public abstract void fill(long offsetBytes, |
| long lengthBytes, |
| byte value)</pre> |
| <div class="block">Fills a portion of this Memory region to the given byte value.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd> |
| <dd><code>lengthBytes</code> - the length in bytes</dd> |
| <dd><code>value</code> - the given byte value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setBits-long-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setBits</h4> |
| <pre>public abstract void setBits(long offsetBytes, |
| byte bitMask)</pre> |
| <div class="block">Sets the bits defined by the bitMask</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd> |
| <dd><code>bitMask</code> - the bits set to one will be set</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMemoryRequestServer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMemoryRequestServer</h4> |
| <pre>public <a href="../../../com/yahoo/memory/MemoryRequestServer.html" title="interface in com.yahoo.memory">MemoryRequestServer</a> getMemoryRequestServer()</pre> |
| <div class="block">For Direct Memory only. Other types of backing resources will return null. |
| Gets the MemoryRequestServer object used by dynamic off-heap (Direct) memory objects |
| to request additional memory. |
| Set using <a href="../../../com/yahoo/memory/WritableMemory.html#allocateDirect-long-com.yahoo.memory.MemoryRequestServer-"><code>allocateDirect(long, MemoryRequestServer)</code></a>. |
| If not explicity set, this returns the <a href="../../../com/yahoo/memory/DefaultMemoryRequestServer.html" title="class in com.yahoo.memory"><code>DefaultMemoryRequestServer</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the MemoryRequestServer object (if direct memory) or null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equals-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public final boolean equals(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> that)</pre> |
| <div class="block">Returns true if the given object is an instance of this class and has equal data contents.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://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></code> in class <code><a href="https://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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>that</code> - the given object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the given Object is an instance of this class and has equal data contents.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equalTo-long-java.lang.Object-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equalTo</h4> |
| <pre>public final boolean equalTo(long thisOffsetBytes, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> that, |
| long thatOffsetBytes, |
| long lengthBytes)</pre> |
| <div class="block">Returns true if the given object is an instance of this class and has equal contents to |
| this object in the given range of bytes. This will also check two distinct ranges within the |
| same object for eauals.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>thisOffsetBytes</code> - the starting offset in bytes for this object.</dd> |
| <dd><code>that</code> - the given object</dd> |
| <dd><code>thatOffsetBytes</code> - the starting offset in bytes for the given object</dd> |
| <dd><code>lengthBytes</code> - the size of the range in bytes</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the given object has equal contents to this object in the given range of |
| bytes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getByteBuffer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getByteBuffer</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> getByteBuffer()</pre> |
| <div class="block">Gets the backing ByteBuffer if it exists, otherwise returns null.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the backing ByteBuffer if it exists, otherwise returns null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getByteOrder--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getByteOrder</h4> |
| <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a> getByteOrder()</pre> |
| <div class="block">Gets the current ByteOrder. |
| This may be different from the ByteOrder of the backing resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current ByteOrder.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCapacity--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCapacity</h4> |
| <pre>public final long getCapacity()</pre> |
| <div class="block">Gets the capacity of this object in bytes</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the capacity of this object in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCumulativeOffset--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCumulativeOffset</h4> |
| <pre>public final long getCumulativeOffset()</pre> |
| <div class="block">Gets the cumulative offset in bytes of this object from the backing resource. |
| This offset may also include other offset components such as the native off-heap |
| memory address, DirectByteBuffer split offsets, region offsets, and unsafe arrayBaseOffsets.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cumulative offset in bytes of this object from the backing resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCumulativeOffset-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCumulativeOffset</h4> |
| <pre>public final long getCumulativeOffset(long offsetBytes)</pre> |
| <div class="block">Gets the cumulative offset in bytes of this object from the backing resource including the given |
| offsetBytes. This offset may also include other offset components such as the native off-heap |
| memory address, DirectByteBuffer split offsets, region offsets, and unsafe arrayBaseOffsets.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - offset to be added to the cumulative offset.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cumulative offset in bytes of this object from the backing resource including the |
| given offsetBytes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRegionOffset--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRegionOffset</h4> |
| <pre>public final long getRegionOffset()</pre> |
| <div class="block">Returns the offset of address zero of this object relative to the address zero of the |
| backing resource but not including the size of any Java object header.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the offset of address zero of this object relative to the address zero of the |
| backing resource but not including the size of any Java object header.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRegionOffset-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRegionOffset</h4> |
| <pre>public final long getRegionOffset(long offsetBytes)</pre> |
| <div class="block">Returns the offset of address zero of this object relative to the address zero of the |
| backing resource plus the given offsetBytes but not including the size of any Java object |
| header.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - the given offsetBytes</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the offset of address zero of this object relative to the address zero of the |
| backing resource plus the given offsetBytes but not including the size of any Java object |
| header.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hasArray--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasArray</h4> |
| <pre>public final boolean hasArray()</pre> |
| <div class="block">Returns true if this object is backed by an on-heap primitive array</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this object is backed by an on-heap primitive array</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hashCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public final int hashCode()</pre> |
| <div class="block">Returns the hashCode of this object. |
| |
| <p>The hash code of this object depends upon all of its contents. |
| Because of this, it is inadvisable to use these objects as keys in hash maps |
| or similar data structures unless it is known that their contents will not change.</p> |
| |
| <p>If it is desirable to use these objects in a hash map depending only on object identity, |
| than the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/IdentityHashMap.html?is-external=true" title="class or interface in java.util"><code>IdentityHashMap</code></a> can be used.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="https://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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the hashCode of this object.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="xxHash64-long-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>xxHash64</h4> |
| <pre>public final long xxHash64(long offsetBytes, |
| long lengthBytes, |
| long seed)</pre> |
| <div class="block">Returns the 64-bit hash of the sequence of bytes in this object specified by |
| <i>offsetBytes</i>, <i>lengthBytes</i> and a <i>seed</i>. Note that the sequence of bytes is |
| always processed in the same order independent of endianness.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - the given offset in bytes to the first byte of the byte sequence.</dd> |
| <dd><code>lengthBytes</code> - the given length in bytes of the byte sequence.</dd> |
| <dd><code>seed</code> - the given long seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the 64-bit hash of the sequence of bytes in this object specified by |
| <i>offsetBytes</i> and <i>lengthBytes</i>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hasByteBuffer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasByteBuffer</h4> |
| <pre>public final boolean hasByteBuffer()</pre> |
| <div class="block">Returns true if this Memory is backed by a ByteBuffer.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this Memory is backed by a ByteBuffer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isDirect--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isDirect</h4> |
| <pre>public final boolean isDirect()</pre> |
| <div class="block">Returns true if the backing resource is direct (off-heap) memory. |
| This is the case for allocated direct memory, memory mapped files,</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the backing resource is direct (off-heap) memory.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNativeOrder--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNativeOrder</h4> |
| <pre>public final boolean isNativeOrder()</pre> |
| <div class="block">Returns true if the current byte order is native order.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the current byte order is native order.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isReadOnly--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isReadOnly</h4> |
| <pre>public final boolean isReadOnly()</pre> |
| <div class="block">Returns true if this object or the backing resource is read-only.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this object or the backing resource is read-only.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSameResource-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSameResource</h4> |
| <pre>public final boolean isSameResource(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> that)</pre> |
| <div class="block">Returns true if the backing resource of <i>this</i> is identical with the backing resource |
| of <i>that</i>. The capacities must be the same. If <i>this</i> is a region, |
| the region offset must also be the same.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>that</code> - A different non-null object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the backing resource of <i>this</i> is the same as the backing resource |
| of <i>that</i>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isValid--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isValid</h4> |
| <pre>public boolean isValid()</pre> |
| <div class="block">Returns true if this object is valid and has not been closed. |
| This is relevant only for direct (off-heap) memory and Mapped Files.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this object is valid and has not been closed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="checkValidAndBounds-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkValidAndBounds</h4> |
| <pre>public final void checkValidAndBounds(long offsetBytes, |
| long lengthBytes)</pre> |
| <div class="block">Checks that the specified range of bytes is within bounds of this object, throws |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if it's not: i. e. if offsetBytes < 0, or length < 0, |
| or offsetBytes + length > <a href="../../../com/yahoo/memory/WritableMemory.html#getCapacity--"><code>getCapacity()</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - the given offset in bytes of this object</dd> |
| <dd><code>lengthBytes</code> - the given length in bytes of this object</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCurrentDirectMemoryAllocations--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentDirectMemoryAllocations</h4> |
| <pre>public static final long getCurrentDirectMemoryAllocations()</pre> |
| <div class="block">Gets the current number of active direct memory allocations.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current number of active direct memory allocations.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCurrentDirectMemoryAllocated--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentDirectMemoryAllocated</h4> |
| <pre>public static final long getCurrentDirectMemoryAllocated()</pre> |
| <div class="block">Gets the current size of active direct memory allocated.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current size of active direct memory allocated.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCurrentDirectMemoryMapAllocations--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentDirectMemoryMapAllocations</h4> |
| <pre>public static final long getCurrentDirectMemoryMapAllocations()</pre> |
| <div class="block">Gets the current number of active direct memory map allocations.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current number of active direct memory map allocations.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCurrentDirectMemoryMapAllocated--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentDirectMemoryMapAllocated</h4> |
| <pre>public static final long getCurrentDirectMemoryMapAllocated()</pre> |
| <div class="block">Gets the current size of active direct memory map allocated.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current size of active direct memory map allocated.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toHexString-java.lang.String-long-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toHexString</h4> |
| <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toHexString(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> header, |
| long offsetBytes, |
| int lengthBytes)</pre> |
| <div class="block">Returns a formatted hex string of a range of this object. |
| Used primarily for testing.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>header</code> - a descriptive header</dd> |
| <dd><code>offsetBytes</code> - offset bytes relative to this object start</dd> |
| <dd><code>lengthBytes</code> - number of bytes to convert to a hex string</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a formatted hex string in a human readable array</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="../../../overview-summary.html">Overview</a></li> |
| <li><a href="../../../com/yahoo/memory/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/WritableMemory.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/WritableMapHandle.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/yahoo/memory/WritableMemory.html" target="_top">Frames</a></li> |
| <li><a href="WritableMemory.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>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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–2018 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p> |
| </body> |
| </html> |