blob: 588f45585d8f2b5a68d093169490808df211b3ff [file] [log] [blame]
<!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 Sun Mar 26 22:21:06 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WritableMemory (com.yahoo.datasketches:memory 0.10.0 API)</title>
<meta name="date" content="2017-03-26">
<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.10.0 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":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":6,"i40":9,"i41":9,"i42":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&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next&nbsp;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&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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&nbsp;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&nbsp;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&nbsp;offsetBytes,
long&nbsp;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&nbsp;offsetBytes,
byte&nbsp;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&nbsp;offsetBytes,
long&nbsp;expect,
long&nbsp;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&nbsp;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&nbsp;offsetBytes,
long&nbsp;lengthBytes,
byte&nbsp;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&nbsp;offsetBytes,
long&nbsp;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&nbsp;offsetBytes,
long&nbsp;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="../../../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="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#putBoolean-long-boolean-">putBoolean</a></span>(long&nbsp;offsetBytes,
boolean&nbsp;value)</code>
<div class="block">Puts the boolean value at the given offset</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#putBooleanArray-long-boolean:A-int-int-">putBooleanArray</a></span>(long&nbsp;offsetBytes,
boolean[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the boolean array 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#putByte-long-byte-">putByte</a></span>(long&nbsp;offsetBytes,
byte&nbsp;value)</code>
<div class="block">Puts the byte value 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#putByteArray-long-byte:A-int-int-">putByteArray</a></span>(long&nbsp;offsetBytes,
byte[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the byte array 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#putChar-long-char-">putChar</a></span>(long&nbsp;offsetBytes,
char&nbsp;value)</code>
<div class="block">Puts the char value 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#putCharArray-long-char:A-int-int-">putCharArray</a></span>(long&nbsp;offsetBytes,
char[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the char array 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#putDouble-long-double-">putDouble</a></span>(long&nbsp;offsetBytes,
double&nbsp;value)</code>
<div class="block">Puts the double value 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#putDoubleArray-long-double:A-int-int-">putDoubleArray</a></span>(long&nbsp;offsetBytes,
double[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the double array 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#putFloat-long-float-">putFloat</a></span>(long&nbsp;offsetBytes,
float&nbsp;value)</code>
<div class="block">Puts the float value 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#putFloatArray-long-float:A-int-int-">putFloatArray</a></span>(long&nbsp;offsetBytes,
float[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the float array 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#putInt-long-int-">putInt</a></span>(long&nbsp;offsetBytes,
int&nbsp;value)</code>
<div class="block">Puts the int value 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#putIntArray-long-int:A-int-int-">putIntArray</a></span>(long&nbsp;offsetBytes,
int[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the int array 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#putLong-long-long-">putLong</a></span>(long&nbsp;offsetBytes,
long&nbsp;value)</code>
<div class="block">Puts the long value 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#putLongArray-long-long:A-int-int-">putLongArray</a></span>(long&nbsp;offsetBytes,
long[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the long array 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#putShort-long-short-">putShort</a></span>(long&nbsp;offsetBytes,
short&nbsp;value)</code>
<div class="block">Puts the short value 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#putShortArray-long-short:A-int-int-">putShortArray</a></span>(long&nbsp;offsetBytes,
short[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the short array 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#setBits-long-byte-">setBits</a></span>(long&nbsp;offsetBytes,
byte&nbsp;bitMask)</code>
<div class="block">Sets the bits defined by the bitMask</div>
</td>
</tr>
<tr id="i30" 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-boolean:A-">wrap</a></span>(boolean[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</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-byte:A-">wrap</a></span>(byte[]&nbsp;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-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>&nbsp;byteBuf)</code>
<div class="block">Accesses the given ByteBuffer 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-char:A-">wrap</a></span>(char[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array 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-double:A-">wrap</a></span>(double[]&nbsp;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-float:A-">wrap</a></span>(float[]&nbsp;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-int:A-">wrap</a></span>(int[]&nbsp;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-long:A-">wrap</a></span>(long[]&nbsp;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-short:A-">wrap</a></span>(short[]&nbsp;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>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="i40" 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-">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>&nbsp;file)</code>
<div class="block">Allocates direct memory used to memory map files for write operations
(including those &gt; 2GB).</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-long-long-">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>&nbsp;file,
long&nbsp;fileOffset,
long&nbsp;capacity)</code>
<div class="block">Allocates direct memory used to memory map files for write operations
(including those &gt; 2GB).</div>
</td>
</tr>
<tr id="i42" 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-">writableRegion</a></span>(long&nbsp;offsetBytes,
long&nbsp;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&nbsp;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#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#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-">map</a>, <a href="../../../com/yahoo/memory/Memory.html#region-long-long-">region</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&nbsp;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&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;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>&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemoryMapHandler.html" title="class in com.yahoo.memory">WritableMemoryMapHandler</a>&nbsp;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>&nbsp;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 &gt; 2GB).</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-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writableMap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/WritableMemoryMapHandler.html" title="class in com.yahoo.memory">WritableMemoryMapHandler</a>&nbsp;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>&nbsp;file,
long&nbsp;fileOffset,
long&nbsp;capacity)
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 &gt; 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>
<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&nbsp;<a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory">WritableMemoryDirectHandler</a>&nbsp;allocateDirect(long&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;writableRegion(long&nbsp;offsetBytes,
long&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;allocate(int&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(boolean[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(byte[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(char[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(short[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(int[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(long[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(float[]&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;wrap(double[]&nbsp;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&nbsp;void&nbsp;putBoolean(long&nbsp;offsetBytes,
boolean&nbsp;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&nbsp;void&nbsp;putBooleanArray(long&nbsp;offsetBytes,
boolean[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putByte(long&nbsp;offsetBytes,
byte&nbsp;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&nbsp;void&nbsp;putByteArray(long&nbsp;offsetBytes,
byte[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putChar(long&nbsp;offsetBytes,
char&nbsp;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&nbsp;void&nbsp;putCharArray(long&nbsp;offsetBytes,
char[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putDouble(long&nbsp;offsetBytes,
double&nbsp;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&nbsp;void&nbsp;putDoubleArray(long&nbsp;offsetBytes,
double[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putFloat(long&nbsp;offsetBytes,
float&nbsp;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&nbsp;void&nbsp;putFloatArray(long&nbsp;offsetBytes,
float[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putInt(long&nbsp;offsetBytes,
int&nbsp;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&nbsp;void&nbsp;putIntArray(long&nbsp;offsetBytes,
int[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putLong(long&nbsp;offsetBytes,
long&nbsp;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&nbsp;void&nbsp;putLongArray(long&nbsp;offsetBytes,
long[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;void&nbsp;putShort(long&nbsp;offsetBytes,
short&nbsp;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&nbsp;void&nbsp;putShortArray(long&nbsp;offsetBytes,
short[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;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&nbsp;long&nbsp;getAndAddLong(long&nbsp;offsetBytes,
long&nbsp;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&nbsp;boolean&nbsp;compareAndSwapLong(long&nbsp;offsetBytes,
long&nbsp;expect,
long&nbsp;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&nbsp;long&nbsp;getAndSetLong(long&nbsp;offsetBytes,
long&nbsp;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&nbsp;<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>&nbsp;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&nbsp;void&nbsp;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&nbsp;void&nbsp;clear(long&nbsp;offsetBytes,
long&nbsp;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&nbsp;void&nbsp;clearBits(long&nbsp;offsetBytes,
byte&nbsp;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&nbsp;void&nbsp;fill(byte&nbsp;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&nbsp;void&nbsp;fill(long&nbsp;offsetBytes,
long&nbsp;lengthBytes,
byte&nbsp;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&nbsp;void&nbsp;setBits(long&nbsp;offsetBytes,
byte&nbsp;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&nbsp;<a href="../../../com/yahoo/memory/MemoryRequest.html" title="interface in com.yahoo.memory">MemoryRequest</a>&nbsp;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&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/WritableMemoryDirectHandler.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next&nbsp;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&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2015&#x2013;2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p>
</body>
</html>