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.IOExceptionpublic long size()
public void prepareToAppend()
throws java.io.IOException
AbstractSieve.NewFlowReceiverprepareToAppend in interface AbstractSieve.NewFlowReceiver<T>java.io.IOExceptionpublic void append(long hash,
T key)
throws java.io.IOException
AbstractSieve.NewFlowReceiverappend in interface AbstractSieve.NewFlowReceiver<T>hash - the key hash.key - the key itself.java.io.IOExceptionpublic void finishedAppending()
throws java.io.IOException
AbstractSieve.NewFlowReceiverfinishedAppending in interface AbstractSieve.NewFlowReceiver<T>java.io.IOExceptionpublic void noMoreAppend()
throws java.io.IOException
AbstractSieve.NewFlowReceivernoMoreAppend in interface AbstractSieve.NewFlowReceiver<T>java.io.IOExceptionpublic 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.IOExceptionjava.lang.InterruptedException