public class InPlaceMutableHashTable<T> extends AbstractMutableHashTable<T>
Modifier and Type | Class and Description |
---|---|
class |
InPlaceMutableHashTable.EntryIterator
WARNING: Doing any other operation on the table invalidates the iterator! (Even
using getMatchFor of a prober!)
|
class |
InPlaceMutableHashTable.HashTableProber<PT>
A prober for accessing the table.
|
class |
InPlaceMutableHashTable.ReduceFacade
A facade for doing such operations on the hash table that are needed for a reduce operator driver.
|
buildSideComparator, buildSideSerializer, closed, stateLock
Constructor and Description |
---|
InPlaceMutableHashTable(TypeSerializer<T> serializer,
TypeComparator<T> comparator,
List<MemorySegment> memory) |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
void |
close()
Closes the hash table.
|
long |
getCapacity()
Gets the total capacity of this hash table, in bytes.
|
InPlaceMutableHashTable.EntryIterator |
getEntryIterator()
Returns an iterator that can be used to iterate over all the elements in the table.
|
List<MemorySegment> |
getFreeMemory() |
long |
getOccupancy()
Gets the number of bytes currently occupied in this hash table.
|
<PT> InPlaceMutableHashTable.HashTableProber<PT> |
getProber(TypeComparator<PT> probeTypeComparator,
TypePairComparator<PT,T> pairComparator) |
void |
insert(T record)
Inserts the given record into the hash table.
|
void |
insertOrReplaceRecord(T record)
Searches the hash table for a record with the given key.
|
void |
open()
Initialize the hash table
|
getBuildSideComparator, getBuildSideSerializer
public InPlaceMutableHashTable(TypeSerializer<T> serializer, TypeComparator<T> comparator, List<MemorySegment> memory)
public long getCapacity()
public long getOccupancy()
public void open()
open
in class AbstractMutableHashTable<T>
public void close()
AbstractMutableHashTable
close
in class AbstractMutableHashTable<T>
public void abort()
abort
in class AbstractMutableHashTable<T>
public List<MemorySegment> getFreeMemory()
getFreeMemory
in class AbstractMutableHashTable<T>
public void insertOrReplaceRecord(T record) throws IOException
insertOrReplaceRecord
in class AbstractMutableHashTable<T>
record
- The record to insert or to replace with.IOException
- (EOFException specifically, if memory ran out)public void insert(T record) throws IOException
insert
in class AbstractMutableHashTable<T>
record
- The record to insert.IOException
- (EOFException specifically, if memory ran out)public InPlaceMutableHashTable.EntryIterator getEntryIterator()
getEntryIterator
in class AbstractMutableHashTable<T>
public <PT> InPlaceMutableHashTable.HashTableProber<PT> getProber(TypeComparator<PT> probeTypeComparator, TypePairComparator<PT,T> pairComparator)
getProber
in class AbstractMutableHashTable<T>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.