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 TypeMethodDescriptionvoidclose()voidfill(long fromIndex, long toIndex, long value) Fill slots betweenfromIndexinclusive totoIndexexclusive withvalue.voidfillWith(StreamInput in) Alternative ofLongArray.readFrom(StreamInput)where the written bytes are loaded into an existingLongArraylongget(long index) Get an element given its index.longgetAndSet(long index, long value) Set a value at the given index and return the previous value.longincrement(long index, long inc) Increment value at the given index byincand return the value.longvoidset(long index, byte[] buf, int offset, int len) Bulk set.voidset(long index, long value) Set a value at the given index.longsize()Return the length of this array.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
size
public long size()Description copied from interface:BigArrayReturn the length of this array. -
get
public long get(long index) Description copied from interface:LongArrayGet an element given its index. -
getAndSet
public long getAndSet(long index, long value) Description copied from interface:LongArraySet a value at the given index and return the previous value. -
set
public void set(long index, long value) Description copied from interface:LongArraySet a value at the given index. -
increment
public long increment(long index, long inc) Description copied from interface:LongArrayIncrement value at the given index byincand return the value. -
fill
public void fill(long fromIndex, long toIndex, long value) Description copied from interface:LongArrayFill slots betweenfromIndexinclusive totoIndexexclusive withvalue. -
fillWith
Description copied from interface:LongArrayAlternative ofLongArray.readFrom(StreamInput)where the written bytes are loaded into an existingLongArray- Specified by:
fillWithin interfaceLongArray- Throws:
IOException
-
set
public void set(long index, byte[] buf, int offset, int len) Description copied from interface:LongArrayBulk set. -
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-