Class ReleasableLongArray

java.lang.Object
org.elasticsearch.common.util.ReleasableLongArray
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.lucene.util.Accountable, Writeable, BigArray, LongArray, Releasable

public class ReleasableLongArray extends Object implements LongArray
  • 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 Type
    Method
    Description
    void
     
    void
    fill(long fromIndex, long toIndex, long value)
    Fill slots between fromIndex inclusive to toIndex exclusive with value.
    long
    get(long index)
    Get an element given its index.
    long
    increment(long index, long inc)
    Increment value at the given index by inc and return the value.
    long
     
    void
    set(long index, byte[] buf, int offset, int len)
    Bulk set.
    long
    set(long index, long value)
    Set a value at the given index and return the previous value.
    long
    Return the length of this array.
    void
    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

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • size

      public long size()
      Description copied from interface: BigArray
      Return the length of this array.
      Specified by:
      size in interface BigArray
    • get

      public long get(long index)
      Description copied from interface: LongArray
      Get an element given its index.
      Specified by:
      get in interface LongArray
    • set

      public long set(long index, long value)
      Description copied from interface: LongArray
      Set a value at the given index and return the previous value.
      Specified by:
      set in interface LongArray
    • increment

      public long increment(long index, long inc)
      Description copied from interface: LongArray
      Increment value at the given index by inc and return the value.
      Specified by:
      increment in interface LongArray
    • fill

      public void fill(long fromIndex, long toIndex, long value)
      Description copied from interface: LongArray
      Fill slots between fromIndex inclusive to toIndex exclusive with value.
      Specified by:
      fill in interface LongArray
    • set

      public void set(long index, byte[] buf, int offset, int len)
      Description copied from interface: LongArray
      Bulk set.
      Specified by:
      set in interface LongArray
    • ramBytesUsed

      public long ramBytesUsed()
      Specified by:
      ramBytesUsed in interface org.apache.lucene.util.Accountable
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface Releasable