AbstractSieve.DiskNewFlow
, Frontier
public static interface AbstractSieve.NewFlowReceiver<K>
AbstractSieve
. Every time the
sieve is ready to produce new keys, it will call the prepareToAppend()
method to warn the new flow receiver. Then it will call append(long, Object)
(typically many times in a row) to add the new keys. After that, the
end of the current new flow of keys is signalled by calling finishedAppending()
.
A call to noMoreAppend()
will, instead, mean that no more keys
will ever be produced by the sieve that is calling it.Modifier and Type | Method | Description |
---|---|---|
void |
append(long hash,
K key) |
A new key is appended.
|
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.
|
void prepareToAppend() throws java.io.IOException
java.io.IOException
void append(long hash, K key) throws java.io.IOException
hash
- the key hash.key
- the key itself.java.io.IOException
void finishedAppending() throws java.io.IOException
java.io.IOException
void noMoreAppend() throws java.io.IOException
java.io.IOException