| <!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_121) on Wed Mar 29 10:00:26 PDT 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>WritableMemory (com.yahoo.datasketches:memory 0.9.9-SNAPSHOT API)</title> |
| <meta name="date" content="2017-03-29"> |
| <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.9.9-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":6,"i41":9,"i42":9,"i43":6}; |
| 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/WritableBuffer.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/yahoo/memory/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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">com.yahoo.memory</div> |
| <h2 title="Class WritableMemory" class="title">Class WritableMemory</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../com/yahoo/memory/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>Lee Rhodes</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#WritableMemory--">WritableMemory</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="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</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory">WritableMemoryDirectHandler</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="i2" 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">Convert this WritableMemory to a WritableBuffer</div> |
| </td> |
| </tr> |
| <tr id="i3" 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="i4" 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="i5" 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="i6" 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="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#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="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#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="i9" 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="i10" 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="i11" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></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="i12" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="http://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">Returns the backing ByteBuffer if it exists, otherwise returns null.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/MemoryRequest.html" title="interface in com.yahoo.memory">MemoryRequest</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#getMemoryRequest--">getMemoryRequest</a></span>()</code> |
| <div class="block">Returns a MemoryRequest or null</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#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="i15" 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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the boolean array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i16" 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="i17" 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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the byte array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i18" 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="i19" 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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the char array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <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="i21" class="rowColor"> |
| <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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the double array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <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="i23" class="rowColor"> |
| <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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the float array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <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="i25" class="rowColor"> |
| <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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the int array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <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="i27" class="rowColor"> |
| <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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the long array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <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="i29" class="rowColor"> |
| <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 srcOffset, |
| int length)</code> |
| <div class="block">Puts the short array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <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="i31" 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</div> |
| </td> |
| </tr> |
| <tr id="i32" 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</div> |
| </td> |
| </tr> |
| <tr id="i33" 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="http://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="i34" 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-char:A-">wrap</a></span>(char[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations</div> |
| </td> |
| </tr> |
| <tr id="i35" 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-double:A-">wrap</a></span>(double[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations</div> |
| </td> |
| </tr> |
| <tr id="i36" 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-float:A-">wrap</a></span>(float[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations</div> |
| </td> |
| </tr> |
| <tr id="i37" 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-int:A-">wrap</a></span>(int[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations</div> |
| </td> |
| </tr> |
| <tr id="i38" 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-long:A-">wrap</a></span>(long[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations</div> |
| </td> |
| </tr> |
| <tr id="i39" 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-short:A-">wrap</a></span>(short[] arr)</code> |
| <div class="block">Wraps the given primitive array for write operations</div> |
| </td> |
| </tr> |
| <tr id="i40" 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#writableDuplicate--">writableDuplicate</a></span>()</code> |
| <div class="block">Returns a writable duplicate view of this Memory.</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemoryMapHandler.html" title="class in com.yahoo.memory">WritableMemoryMapHandler</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#writableMap-java.io.File-">writableMap</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file)</code> |
| <div class="block">Allocates direct memory used to memory map files for write operations |
| (including those > 2GB).</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableMemoryMapHandler.html" title="class in com.yahoo.memory">WritableMemoryMapHandler</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableMemory.html#writableMap-java.io.File-long-long-java.nio.ByteOrder-">writableMap</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file, |
| long fileOffset, |
| long capacity, |
| <a href="http://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">Allocates direct memory used to memory map files for write operations |
| (including those > 2GB).</div> |
| </td> |
| </tr> |
| <tr id="i43" 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">Returns a writable region of this WritableMemory</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#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#duplicate--">duplicate</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#getCapacity--">getCapacity</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#getCumulativeOffset-long-">getCumulativeOffset</a>, <a href="../../../com/yahoo/memory/Memory.html#getCurrentDirectMemoryAllocated--">getCurrentDirectMemoryAllocated</a>, <a href="../../../com/yahoo/memory/Memory.html#getCurrentDirectMemoryAllocations--">getCurrentDirectMemoryAllocations</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#getResourceOrder--">getResourceOrder</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#hasArray--">hasArray</a>, <a href="../../../com/yahoo/memory/Memory.html#hasByteBuffer--">hasByteBuffer</a>, <a href="../../../com/yahoo/memory/Memory.html#isDirect--">isDirect</a>, <a href="../../../com/yahoo/memory/Memory.html#isResourceReadOnly--">isResourceReadOnly</a>, <a href="../../../com/yahoo/memory/Memory.html#isValid--">isValid</a>, <a href="../../../com/yahoo/memory/Memory.html#map-java.io.File-">map</a>, <a href="../../../com/yahoo/memory/Memory.html#map-java.io.File-long-long-java.nio.ByteOrder-">map</a>, <a href="../../../com/yahoo/memory/Memory.html#region-long-long-">region</a>, <a href="../../../com/yahoo/memory/Memory.html#swapBytes--">swapBytes</a>, <a href="../../../com/yahoo/memory/Memory.html#toHexString-java.lang.String-long-int-">toHexString</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="WritableMemory--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>WritableMemory</h4> |
| <pre>public WritableMemory()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ 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="http://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.</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>the given ByteBuffer for write operations.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writableMap-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writableMap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemoryMapHandler.html" title="class in com.yahoo.memory">WritableMemoryMapHandler</a> writableMap(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file) |
| throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Allocates direct memory used to memory map files for write operations |
| (including those > 2GB). This assumes that the file was written using native byte ordering.</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>WritableMemoryMapHandler for managing this map</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - file not found or RuntimeException, etc.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writableMap-java.io.File-long-long-java.nio.ByteOrder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writableMap</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemoryMapHandler.html" title="class in com.yahoo.memory">WritableMemoryMapHandler</a> writableMap(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file, |
| long fileOffset, |
| long capacity, |
| <a href="http://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="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Allocates direct memory used to memory map files for write operations |
| (including those > 2GB).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - the given file to map</dd> |
| <dd><code>fileOffset</code> - the position in the given file</dd> |
| <dd><code>capacity</code> - the size of the allocated direct memory</dd> |
| <dd><code>byteOrder</code> - the endianness of the given file.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>WritableMemoryMapHandler for managing this map</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - file not found or RuntimeException, etc.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocateDirect-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocateDirect</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory">WritableMemoryDirectHandler</a> allocateDirect(long capacityBytes)</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. |
| |
| <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>WritableMemoryMapHandler for managing this off-heap resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writableDuplicate--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writableDuplicate</h4> |
| <pre>public abstract <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> writableDuplicate()</pre> |
| <div class="block">Returns a writable duplicate view of this Memory.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a writable duplicate view of this Memory</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">Returns a writable region of this WritableMemory</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offsetBytes</code> - the starting offset with respect to this WritableMemory</dd> |
| <dd><code>capacityBytes</code> - the capacity of the region in bytes</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a writable region of this WritableMemory</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">Convert this WritableMemory to a WritableBuffer</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>WritableBuffer</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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</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>WritableMemory for write operations</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</code> - number of array units to transfer</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 srcOffset, |
| int length)</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>srcOffset</code> - offset in array units</dd> |
| <dd><code>length</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 modified 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="http://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="getByteBuffer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getByteBuffer</h4> |
| <pre>public abstract <a href="http://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">Returns 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="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="getMemoryRequest--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getMemoryRequest</h4> |
| <pre>public abstract <a href="../../../com/yahoo/memory/MemoryRequest.html" title="interface in com.yahoo.memory">MemoryRequest</a> getMemoryRequest()</pre> |
| <div class="block">Returns a MemoryRequest or null</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a MemoryRequest or null</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/WritableBuffer.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/yahoo/memory/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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2015–2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p> |
| </body> |
| </html> |