- All Superinterfaces:
org.apache.lucene.util.Accountable
,AutoCloseable
,BigArray
,Closeable
,Releasable
,Writeable
Abstraction of an array of integer values.
-
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
fill
(long fromIndex, long toIndex, int value) Fill slots betweenfromIndex
inclusive totoIndex
exclusive withvalue
.void
fillWith
(StreamInput in) Alternative ofreadFrom(StreamInput)
where the written bytes are loaded into an existingIntArray
int
get
(long index) Get an element given its index.int
getAndSet
(long index, int value) Set a value at the given index and return the previous value.int
increment
(long index, int inc) Increment value at the given index byinc
and return the value.static IntArray
readFrom
(StreamInput in) void
set
(long index, byte[] buf, int offset, int len) Bulk set.void
set
(long index, int value) Set a value at the given indexMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsed
Methods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
readFrom
- Throws:
IOException
-
get
int get(long index) Get an element given its index. -
getAndSet
int getAndSet(long index, int value) Set a value at the given index and return the previous value. -
set
void set(long index, int value) Set a value at the given index -
increment
int increment(long index, int inc) Increment value at the given index byinc
and return the value. -
fill
void fill(long fromIndex, long toIndex, int value) Fill slots betweenfromIndex
inclusive totoIndex
exclusive withvalue
. -
fillWith
Alternative ofreadFrom(StreamInput)
where the written bytes are loaded into an existingIntArray
- Throws:
IOException
-
set
void set(long index, byte[] buf, int offset, int len) Bulk set.
-