|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|
|
|
<html lang="en"> |
|
<head> |
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
<title>BufferUtil (JanusGraph-Core: Core Library for JanusGraph 1.0.0 API)</title> |
|
<meta name="date" content="2023-10-21"> |
|
<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="BufferUtil (JanusGraph-Core: Core Library for JanusGraph 1.0.0 API)"; |
|
} |
|
} |
|
catch(err) { |
|
} |
|
|
|
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9}; |
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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> |
|
|
|
<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="package-summary.html">Package</a></li> |
|
<li class="navBarCell1Rev">Class</li> |
|
<li><a href="class-use/BufferUtil.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="../../../../org/janusgraph/diskstorage/util/BackendOperation.TransactionalProvider.html" title="interface in org.janusgraph.diskstorage.util"><span class="typeNameLink">Prev Class</span></a></li> |
|
<li><a href="../../../../org/janusgraph/diskstorage/util/ByteBufferUtil.html" title="class in org.janusgraph.diskstorage.util"><span class="typeNameLink">Next Class</span></a></li> |
|
</ul> |
|
<ul class="navList"> |
|
<li><a href="../../../../index.html?org/janusgraph/diskstorage/util/BufferUtil.html" target="_top">Frames</a></li> |
|
<li><a href="BufferUtil.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"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
</div> |
|
<div> |
|
<ul class="subNavList"> |
|
<li>Summary: </li> |
|
<li>Nested | </li> |
|
<li><a href="#field.summary">Field</a> | </li> |
|
<li><a href="#constructor.summary">Constr</a> | </li> |
|
<li><a href="#method.summary">Method</a></li> |
|
</ul> |
|
<ul class="subNavList"> |
|
<li>Detail: </li> |
|
<li><a href="#field.detail">Field</a> | </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> |
|
|
|
|
|
<div class="header"> |
|
<div class="subTitle">org.janusgraph.diskstorage.util</div> |
|
<h2 title="Class BufferUtil" class="title">Class BufferUtil</h2> |
|
</div> |
|
<div class="contentContainer"> |
|
<ul class="inheritance"> |
|
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
|
<li> |
|
<ul class="inheritance"> |
|
<li>org.janusgraph.diskstorage.util.BufferUtil</li> |
|
</ul> |
|
</li> |
|
</ul> |
|
<div class="description"> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<hr> |
|
<br> |
|
<pre>public class <span class="typeNameLabel">BufferUtil</span> |
|
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
|
<div class="block">Utility methods for dealing with <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><code>ByteBuffer</code></a>.</div> |
|
</li> |
|
</ul> |
|
</div> |
|
<div class="summary"> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
|
|
<ul class="blockList"> |
|
<li class="blockList"><a name="field.summary"> |
|
|
|
</a> |
|
<h3>Field Summary</h3> |
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption> |
|
<tr> |
|
<th class="colFirst" scope="col">Modifier and Type</th> |
|
<th class="colLast" scope="col">Field and Description</th> |
|
</tr> |
|
<tr class="altColor"> |
|
<td class="colFirst"><code>static int</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#byteSize">byteSize</a></span></code> </td> |
|
</tr> |
|
<tr class="rowColor"> |
|
<td class="colFirst"><code>static int</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#charSize">charSize</a></span></code> </td> |
|
</tr> |
|
<tr class="altColor"> |
|
<td class="colFirst"><code>static int</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#intSize">intSize</a></span></code> </td> |
|
</tr> |
|
<tr class="rowColor"> |
|
<td class="colFirst"><code>static int</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#longSize">longSize</a></span></code> </td> |
|
</tr> |
|
</table> |
|
</li> |
|
</ul> |
|
|
|
<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="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#BufferUtil--">BufferUtil</a></span>()</code> </td> |
|
</tr> |
|
</table> |
|
</li> |
|
</ul> |
|
|
|
<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="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="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#emptyBuffer--">emptyBuffer</a></span>()</code> </td> |
|
</tr> |
|
<tr id="i1" class="rowColor"> |
|
<td class="colFirst"><code>static boolean</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#equals-org.janusgraph.diskstorage.StaticBuffer-java.nio.ByteBuffer-">equals</a></span>(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> b1, |
|
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> b2)</code> |
|
<div class="block">Thread safe equals method for StaticBuffer - ByteBuffer equality comparison</div> |
|
</td> |
|
</tr> |
|
<tr id="i2" class="altColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#fillBuffer-int-byte-">fillBuffer</a></span>(int len, |
|
byte value)</code> </td> |
|
</tr> |
|
<tr id="i3" class="rowColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#getIntBuffer-int-">getIntBuffer</a></span>(int id)</code> </td> |
|
</tr> |
|
<tr id="i4" class="altColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#getIntBuffer-int:A-">getIntBuffer</a></span>(int[] ids)</code> </td> |
|
</tr> |
|
<tr id="i5" class="rowColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#getLongBuffer-long-">getLongBuffer</a></span>(long id)</code> </td> |
|
</tr> |
|
<tr id="i6" class="altColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#getStringIdBuffer-java.lang.String-">getStringIdBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s)</code> |
|
<div class="block">We always add a byte marker at the beginning to indicate it's a string buffer.</div> |
|
</td> |
|
</tr> |
|
<tr id="i7" class="rowColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#nextBiggerBuffer-org.janusgraph.diskstorage.StaticBuffer-">nextBiggerBuffer</a></span>(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> buffer)</code> </td> |
|
</tr> |
|
<tr id="i8" class="altColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#nextBiggerBufferAllowOverflow-org.janusgraph.diskstorage.StaticBuffer-">nextBiggerBufferAllowOverflow</a></span>(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> buffer)</code> </td> |
|
</tr> |
|
<tr id="i9" class="rowColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#oneBuffer-int-">oneBuffer</a></span>(int len)</code> </td> |
|
</tr> |
|
<tr id="i10" class="altColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#padBuffer-org.janusgraph.diskstorage.StaticBuffer-int-">padBuffer</a></span>(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> b, |
|
int length)</code> </td> |
|
</tr> |
|
<tr id="i11" class="rowColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#readBuffer-org.janusgraph.diskstorage.ScanBuffer-">readBuffer</a></span>(<a href="../../../../org/janusgraph/diskstorage/ScanBuffer.html" title="interface in org.janusgraph.diskstorage">ScanBuffer</a> in)</code> </td> |
|
</tr> |
|
<tr id="i12" class="altColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/Entry.html" title="interface in org.janusgraph.diskstorage">Entry</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#readEntry-org.janusgraph.diskstorage.ReadBuffer-org.janusgraph.graphdb.database.serialize.Serializer-">readEntry</a></span>(<a href="../../../../org/janusgraph/diskstorage/ReadBuffer.html" title="interface in org.janusgraph.diskstorage">ReadBuffer</a> in, |
|
<a href="../../../../org/janusgraph/graphdb/database/serialize/Serializer.html" title="interface in org.janusgraph.graphdb.database.serialize">Serializer</a> serializer)</code> </td> |
|
</tr> |
|
<tr id="i13" class="rowColor"> |
|
<td class="colFirst"><code>static void</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#writeBuffer-org.janusgraph.graphdb.database.serialize.DataOutput-org.janusgraph.diskstorage.StaticBuffer-">writeBuffer</a></span>(<a href="../../../../org/janusgraph/graphdb/database/serialize/DataOutput.html" title="interface in org.janusgraph.graphdb.database.serialize">DataOutput</a> out, |
|
<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> buffer)</code> </td> |
|
</tr> |
|
<tr id="i14" class="altColor"> |
|
<td class="colFirst"><code>static void</code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#writeEntry-org.janusgraph.graphdb.database.serialize.DataOutput-org.janusgraph.diskstorage.Entry-">writeEntry</a></span>(<a href="../../../../org/janusgraph/graphdb/database/serialize/DataOutput.html" title="interface in org.janusgraph.graphdb.database.serialize">DataOutput</a> out, |
|
<a href="../../../../org/janusgraph/diskstorage/Entry.html" title="interface in org.janusgraph.diskstorage">Entry</a> entry)</code> </td> |
|
</tr> |
|
<tr id="i15" class="rowColor"> |
|
<td class="colFirst"><code>static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a></code></td> |
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/janusgraph/diskstorage/util/BufferUtil.html#zeroBuffer-int-">zeroBuffer</a></span>(int len)</code> </td> |
|
</tr> |
|
</table> |
|
<ul class="blockList"> |
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
|
|
|
</a> |
|
<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
|
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
|
</ul> |
|
</li> |
|
</ul> |
|
</li> |
|
</ul> |
|
</div> |
|
<div class="details"> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
|
|
<ul class="blockList"> |
|
<li class="blockList"><a name="field.detail"> |
|
|
|
</a> |
|
<h3>Field Detail</h3> |
|
<a name="longSize"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>longSize</h4> |
|
<pre>public static final int longSize</pre> |
|
<dl> |
|
<dt><span class="seeLabel">See Also:</span></dt> |
|
<dd><a href="../../../../constant-values.html#org.janusgraph.diskstorage.util.BufferUtil.longSize">Constant Field Values</a></dd> |
|
</dl> |
|
</li> |
|
</ul> |
|
<a name="intSize"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>intSize</h4> |
|
<pre>public static final int intSize</pre> |
|
<dl> |
|
<dt><span class="seeLabel">See Also:</span></dt> |
|
<dd><a href="../../../../constant-values.html#org.janusgraph.diskstorage.util.BufferUtil.intSize">Constant Field Values</a></dd> |
|
</dl> |
|
</li> |
|
</ul> |
|
<a name="charSize"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>charSize</h4> |
|
<pre>public static final int charSize</pre> |
|
<dl> |
|
<dt><span class="seeLabel">See Also:</span></dt> |
|
<dd><a href="../../../../constant-values.html#org.janusgraph.diskstorage.util.BufferUtil.charSize">Constant Field Values</a></dd> |
|
</dl> |
|
</li> |
|
</ul> |
|
<a name="byteSize"> |
|
|
|
</a> |
|
<ul class="blockListLast"> |
|
<li class="blockList"> |
|
<h4>byteSize</h4> |
|
<pre>public static final int byteSize</pre> |
|
<dl> |
|
<dt><span class="seeLabel">See Also:</span></dt> |
|
<dd><a href="../../../../constant-values.html#org.janusgraph.diskstorage.util.BufferUtil.byteSize">Constant Field Values</a></dd> |
|
</dl> |
|
</li> |
|
</ul> |
|
</li> |
|
</ul> |
|
|
|
<ul class="blockList"> |
|
<li class="blockList"><a name="constructor.detail"> |
|
|
|
</a> |
|
<h3>Constructor Detail</h3> |
|
<a name="BufferUtil--"> |
|
|
|
</a> |
|
<ul class="blockListLast"> |
|
<li class="blockList"> |
|
<h4>BufferUtil</h4> |
|
<pre>public BufferUtil()</pre> |
|
</li> |
|
</ul> |
|
</li> |
|
</ul> |
|
|
|
<ul class="blockList"> |
|
<li class="blockList"><a name="method.detail"> |
|
|
|
</a> |
|
<h3>Method Detail</h3> |
|
<a name="getIntBuffer-int-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>getIntBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> getIntBuffer(int id)</pre> |
|
</li> |
|
</ul> |
|
<a name="getIntBuffer-int:A-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>getIntBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> getIntBuffer(int[] ids)</pre> |
|
</li> |
|
</ul> |
|
<a name="getStringIdBuffer-java.lang.String-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>getStringIdBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> getStringIdBuffer(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s)</pre> |
|
<div class="block">We always add a byte marker at the beginning to indicate it's a string buffer. Then we |
|
write the string uncompressed. Finally, if the total buffer size is 8, we add a dummy byte |
|
at the end so that upon read time, JanusGraph knows the buffer does not store a long value. |
|
See <a href="../../../../org/janusgraph/graphdb/idmanagement/IDManager.html#getKeyID-org.janusgraph.diskstorage.StaticBuffer-"><code>IDManager.getKeyID(StaticBuffer)</code></a> for more details. |
|
|
|
Note that we apply STOP_MASK to the last character. We don't have to do it because a static buffer |
|
has a fixed length, and thus upon read time, we know where to stop reading the string. This is more |
|
to keep it consistent with <a href="../../../../org/janusgraph/util/encoding/StringEncoding.html#writeAsciiString-byte:A-int-java.lang.String-"><code>StringEncoding.writeAsciiString(byte[], int, String)</code></a> where we use |
|
STOP_MASK to mark the end of the string. An additional benefit of doing so is to enable corruption check |
|
in the future. Note: this approach has no overhead.</div> |
|
<dl> |
|
<dt><span class="paramLabel">Parameters:</span></dt> |
|
<dd><code>s</code> - </dd> |
|
<dt><span class="returnLabel">Returns:</span></dt> |
|
</dl> |
|
</li> |
|
</ul> |
|
<a name="getLongBuffer-long-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>getLongBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> getLongBuffer(long id)</pre> |
|
</li> |
|
</ul> |
|
<a name="fillBuffer-int-byte-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>fillBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> fillBuffer(int len, |
|
byte value)</pre> |
|
</li> |
|
</ul> |
|
<a name="oneBuffer-int-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>oneBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> oneBuffer(int len)</pre> |
|
</li> |
|
</ul> |
|
<a name="zeroBuffer-int-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>zeroBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> zeroBuffer(int len)</pre> |
|
</li> |
|
</ul> |
|
<a name="emptyBuffer--"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>emptyBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> emptyBuffer()</pre> |
|
</li> |
|
</ul> |
|
<a name="writeEntry-org.janusgraph.graphdb.database.serialize.DataOutput-org.janusgraph.diskstorage.Entry-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>writeEntry</h4> |
|
<pre>public static void writeEntry(<a href="../../../../org/janusgraph/graphdb/database/serialize/DataOutput.html" title="interface in org.janusgraph.graphdb.database.serialize">DataOutput</a> out, |
|
<a href="../../../../org/janusgraph/diskstorage/Entry.html" title="interface in org.janusgraph.diskstorage">Entry</a> entry)</pre> |
|
</li> |
|
</ul> |
|
<a name="writeBuffer-org.janusgraph.graphdb.database.serialize.DataOutput-org.janusgraph.diskstorage.StaticBuffer-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>writeBuffer</h4> |
|
<pre>public static void writeBuffer(<a href="../../../../org/janusgraph/graphdb/database/serialize/DataOutput.html" title="interface in org.janusgraph.graphdb.database.serialize">DataOutput</a> out, |
|
<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> buffer)</pre> |
|
</li> |
|
</ul> |
|
<a name="readEntry-org.janusgraph.diskstorage.ReadBuffer-org.janusgraph.graphdb.database.serialize.Serializer-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>readEntry</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/Entry.html" title="interface in org.janusgraph.diskstorage">Entry</a> readEntry(<a href="../../../../org/janusgraph/diskstorage/ReadBuffer.html" title="interface in org.janusgraph.diskstorage">ReadBuffer</a> in, |
|
<a href="../../../../org/janusgraph/graphdb/database/serialize/Serializer.html" title="interface in org.janusgraph.graphdb.database.serialize">Serializer</a> serializer)</pre> |
|
</li> |
|
</ul> |
|
<a name="readBuffer-org.janusgraph.diskstorage.ScanBuffer-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>readBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> readBuffer(<a href="../../../../org/janusgraph/diskstorage/ScanBuffer.html" title="interface in org.janusgraph.diskstorage">ScanBuffer</a> in)</pre> |
|
</li> |
|
</ul> |
|
<a name="padBuffer-org.janusgraph.diskstorage.StaticBuffer-int-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>padBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> padBuffer(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> b, |
|
int length)</pre> |
|
</li> |
|
</ul> |
|
<a name="nextBiggerBufferAllowOverflow-org.janusgraph.diskstorage.StaticBuffer-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>nextBiggerBufferAllowOverflow</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> nextBiggerBufferAllowOverflow(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> buffer)</pre> |
|
</li> |
|
</ul> |
|
<a name="nextBiggerBuffer-org.janusgraph.diskstorage.StaticBuffer-"> |
|
|
|
</a> |
|
<ul class="blockList"> |
|
<li class="blockList"> |
|
<h4>nextBiggerBuffer</h4> |
|
<pre>public static <a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> nextBiggerBuffer(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> buffer)</pre> |
|
</li> |
|
</ul> |
|
<a name="equals-org.janusgraph.diskstorage.StaticBuffer-java.nio.ByteBuffer-"> |
|
|
|
</a> |
|
<ul class="blockListLast"> |
|
<li class="blockList"> |
|
<h4>equals</h4> |
|
<pre>public static boolean equals(<a href="../../../../org/janusgraph/diskstorage/StaticBuffer.html" title="interface in org.janusgraph.diskstorage">StaticBuffer</a> b1, |
|
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> b2)</pre> |
|
<div class="block">Thread safe equals method for StaticBuffer - ByteBuffer equality comparison</div> |
|
<dl> |
|
<dt><span class="paramLabel">Parameters:</span></dt> |
|
<dd><code>b1</code> - </dd> |
|
<dd><code>b2</code> - </dd> |
|
<dt><span class="returnLabel">Returns:</span></dt> |
|
</dl> |
|
</li> |
|
</ul> |
|
</li> |
|
</ul> |
|
</li> |
|
</ul> |
|
</div> |
|
</div> |
|
|
|
|
|
<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="package-summary.html">Package</a></li> |
|
<li class="navBarCell1Rev">Class</li> |
|
<li><a href="class-use/BufferUtil.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="../../../../org/janusgraph/diskstorage/util/BackendOperation.TransactionalProvider.html" title="interface in org.janusgraph.diskstorage.util"><span class="typeNameLink">Prev Class</span></a></li> |
|
<li><a href="../../../../org/janusgraph/diskstorage/util/ByteBufferUtil.html" title="class in org.janusgraph.diskstorage.util"><span class="typeNameLink">Next Class</span></a></li> |
|
</ul> |
|
<ul class="navList"> |
|
<li><a href="../../../../index.html?org/janusgraph/diskstorage/util/BufferUtil.html" target="_top">Frames</a></li> |
|
<li><a href="BufferUtil.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"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
</div> |
|
<div> |
|
<ul class="subNavList"> |
|
<li>Summary: </li> |
|
<li>Nested | </li> |
|
<li><a href="#field.summary">Field</a> | </li> |
|
<li><a href="#constructor.summary">Constr</a> | </li> |
|
<li><a href="#method.summary">Method</a></li> |
|
</ul> |
|
<ul class="subNavList"> |
|
<li>Detail: </li> |
|
<li><a href="#field.detail">Field</a> | </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> |
|
|
|
<p class="legalCopy"><small>Copyright © 2012–2023. All rights reserved.</small></p> |
|
</body> |
|
</html> |
|
|