AbstractSieve.NewFlowReceiver<T>
public static final class AbstractSieve.DiskNewFlow<T> extends java.lang.Object implements AbstractSieve.NewFlowReceiver<T>
AbstractSieve.NewFlowReceiver
.Constructor | Description |
---|---|
DiskNewFlow(ByteSerializerDeserializer<T> serializer) |
Modifier and Type | Method | Description |
---|---|---|
void |
append(long hash,
T key) |
A new key is appended.
|
MutableString |
dequeueKey() |
Returns the next key in the flow of new pairs remained after the check, and discards the corresponding value.
|
void |
finishedAppending() |
The new flow of keys is over.
|
void |
noMoreAppend() |
There will be no more new flows (because the sieve that is calling
this method was closed).
|
void |
prepareToAppend() |
A new flow of keys is ready and will start being appended.
|
long |
size() |
public DiskNewFlow(ByteSerializerDeserializer<T> serializer) throws java.io.IOException
java.io.IOException
public long size()
public void prepareToAppend() throws java.io.IOException
AbstractSieve.NewFlowReceiver
prepareToAppend
in interface AbstractSieve.NewFlowReceiver<T>
java.io.IOException
public void append(long hash, T key) throws java.io.IOException
AbstractSieve.NewFlowReceiver
append
in interface AbstractSieve.NewFlowReceiver<T>
hash
- the key hash.key
- the key itself.java.io.IOException
public void finishedAppending() throws java.io.IOException
AbstractSieve.NewFlowReceiver
finishedAppending
in interface AbstractSieve.NewFlowReceiver<T>
java.io.IOException
public void noMoreAppend() throws java.io.IOException
AbstractSieve.NewFlowReceiver
noMoreAppend
in interface AbstractSieve.NewFlowReceiver<T>
java.io.IOException
public MutableString dequeueKey() throws java.util.NoSuchElementException, java.io.IOException, java.lang.InterruptedException
AbstractSieve.enqueue(Object, Object)
for a sufficient
number of times or AbstractSieve.flush()
, a call to this method may never return.java.util.NoSuchElementException
- if there is no more pair to be returned; this may only happen if this new flow has been closed.java.io.IOException
java.lang.InterruptedException