java.lang.Object
org.elasticsearch.swisshash.SwissHash
org.elasticsearch.swisshash.LongLongSwissHash
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable,LongLongHashTable,org.elasticsearch.core.Releasable
Specialization for LongSwissHash, for LongLong.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.swisshash.SwissHash
SwissHash.Status -
Field Summary
Fields inherited from class org.elasticsearch.swisshash.SwissHash
breaker, capacity, growCount, mask, nextGrowSize, recycler, sizeFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Method Summary
Modifier and TypeMethodDescriptionlongadd(long key1, long key2) Add akey, returning itsids.voidclose()longfind(long key1, long key2) Finds anidby akey1and akey2.longgetKey1(long id) longgetKey2(long id) iterator()Build an iterator to walk all values and ids.longstatus()Performance information hopefully useful for debugging.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
getChildResourcesMethods inherited from interface org.elasticsearch.common.util.LongLongHashTable
size
-
Method Details
-
find
public long find(long key1, long key2) Finds anidby akey1and akey2.- Specified by:
findin interfaceLongLongHashTable
-
add
public long add(long key1, long key2) Add akey, returning itsids. If it was already present it's previous assignedidwill be returned. If it wasn't present it'll be assigned a newid.- Specified by:
addin interfaceLongLongHashTable
-
status
Description copied from class:SwissHashPerformance information hopefully useful for debugging. -
iterator
Description copied from class:SwissHashBuild an iterator to walk all values and ids. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
getKey1
public long getKey1(long id) - Specified by:
getKey1in interfaceLongLongHashTable
-
getKey2
public long getKey2(long id) - Specified by:
getKey2in interfaceLongLongHashTable
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-