java.io.Closeable
, java.lang.AutoCloseable
public final class IdentitySieve<K,V> extends AbstractSieve<K,V>
Note that instances of this class call AbstractSieve.NewFlowReceiver.prepareToAppend()
in the constructor only, and
AbstractSieve.NewFlowReceiver.noMoreAppend()
in the method close()
only.
AbstractSieve.DefaultUpdateStrategy<K,V>, AbstractSieve.DiskNewFlow<T>, AbstractSieve.NewFlowReceiver<K>, AbstractSieve.SieveEntry<K,V>, AbstractSieve.UpdateStrategy<K,V>
CHAR_SEQUENCE_HASHING_STRATEGY, hashingStrategy, keySerDeser, newFlowReceiver, updateStrategy, valueSerDeser
Constructor | Description |
---|---|
IdentitySieve(AbstractSieve.NewFlowReceiver<K> newFlowReceiver,
ByteSerializerDeserializer<K> keySerDeser,
ByteSerializerDeserializer<V> valueSerDeser,
it.unimi.dsi.sux4j.mph.AbstractHashFunction<K> hashingStrategy,
AbstractSieve.UpdateStrategy<K,V> updateStrategy) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes (forever) this sieve.
|
boolean |
enqueue(K key,
V value) |
Add the given (key,value) pair to the store.
|
void |
flush() |
Forces the check+update of all pairs that have been enqueued.
|
setNewFlowRecevier
public IdentitySieve(AbstractSieve.NewFlowReceiver<K> newFlowReceiver, ByteSerializerDeserializer<K> keySerDeser, ByteSerializerDeserializer<V> valueSerDeser, it.unimi.dsi.sux4j.mph.AbstractHashFunction<K> hashingStrategy, AbstractSieve.UpdateStrategy<K,V> updateStrategy) throws java.io.IOException
java.io.IOException
public boolean enqueue(K key, V value) throws java.io.IOException
AbstractSieve
enqueue
in class AbstractSieve<K,V>
java.io.IOException
public void close() throws java.io.IOException
AbstractSieve
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
close
in class AbstractSieve<K,V>
java.io.IOException
public void flush() throws java.io.IOException, java.lang.InterruptedException
AbstractSieve
flush
in class AbstractSieve<K,V>
java.io.IOException
java.lang.InterruptedException