Interface LongLongHashTable

All Superinterfaces:
org.apache.lucene.util.Accountable, AutoCloseable, Closeable, Releasable
All Known Implementing Classes:
LongLongHash

public interface LongLongHashTable extends Releasable, org.apache.lucene.util.Accountable
A hash table mapping keys (pair of primitive longs) to values to ids, also of primitive long type. The id's start at 0, and increment monotonically as unique keys are added.
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    add(long key1, long key2)
    Adds the given key pair to the table.
    long
    find(long key1, long key2)
    Finds the id associated with the given key pair, or -1 is the key pair is not contained in the hash.
    long
    getKey1(long id)
    Gets the first key from the given id value.
    long
    getKey2(long id)
    Gets the second key from the given id value.
    long
    Returns the size (number of key/value pairs) in the table.

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources, ramBytesUsed

    Methods inherited from interface org.elasticsearch.core.Releasable

    close
  • Method Details

    • getKey1

      long getKey1(long id)
      Gets the first key from the given id value.
    • getKey2

      long getKey2(long id)
      Gets the second key from the given id value.
    • find

      long find(long key1, long key2)
      Finds the id associated with the given key pair, or -1 is the key pair is not contained in the hash.
    • add

      long add(long key1, long key2)
      Adds the given key pair to the table. Return its newly allocated id if it wasn't in the table yet, or -1-id if it was already present in the table.
    • size

      long size()
      Returns the size (number of key/value pairs) in the table.