java.lang.Object
org.elasticsearch.common.util.ReleasableLongArray
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.lucene.util.Accountable
,Writeable
,BigArray
,LongArray
,Releasable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
fill
(long fromIndex, long toIndex, long value) Fill slots betweenfromIndex
inclusive totoIndex
exclusive withvalue
.void
fillWith
(StreamInput in) Alternative ofLongArray.readFrom(StreamInput)
where the written bytes are loaded into an existingLongArray
long
get
(long index) Get an element given its index.long
getAndSet
(long index, long value) Set a value at the given index and return the previous value.long
increment
(long index, long inc) Increment value at the given index byinc
and return the value.long
void
set
(long index, byte[] buf, int offset, int len) Bulk set.void
set
(long index, long value) Set a value at the given index.long
size()
Return the length of this array.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
size
public long size()Description copied from interface:BigArray
Return the length of this array. -
get
public long get(long index) Description copied from interface:LongArray
Get an element given its index. -
getAndSet
public long getAndSet(long index, long value) Description copied from interface:LongArray
Set a value at the given index and return the previous value. -
set
public void set(long index, long value) Description copied from interface:LongArray
Set a value at the given index. -
increment
public long increment(long index, long inc) Description copied from interface:LongArray
Increment value at the given index byinc
and return the value. -
fill
public void fill(long fromIndex, long toIndex, long value) Description copied from interface:LongArray
Fill slots betweenfromIndex
inclusive totoIndex
exclusive withvalue
. -
fillWith
Description copied from interface:LongArray
Alternative ofLongArray.readFrom(StreamInput)
where the written bytes are loaded into an existingLongArray
- Specified by:
fillWith
in interfaceLongArray
- Throws:
IOException
-
set
public void set(long index, byte[] buf, int offset, int len) Description copied from interface:LongArray
Bulk set. -
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsed
in interfaceorg.apache.lucene.util.Accountable
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceReleasable
-