protected static class QuerySources.BatchWriter extends Object implements ResultWriter
Modifier | Constructor and Description |
---|---|
protected |
BatchWriter(int batchSize,
String workspaceName,
RepositoryCache repository) |
Modifier and Type | Method and Description |
---|---|
void |
add(Iterable<NodeKey> nodeKeys,
float score)
Add to the current batch a series of node keys with the same score for each node key.
|
void |
add(Iterator<NodeKey> nodeKeys,
float score)
Add to the current batch a series of node keys with the same score for each node key.
|
void |
add(NodeKey nodeKey,
float score)
Add to the current batch a single node key with a score.
|
protected boolean |
consumeOperation(Filter.Results operation) |
protected NodeSequence.Batch |
convertToBatch(boolean isLast) |
NodeSequence.Batch |
popPreloadedBatch() |
long |
rowCount() |
protected BatchWriter(int batchSize, String workspaceName, RepositoryCache repository)
public void add(NodeKey nodeKey, float score)
ResultWriter
add
in interface ResultWriter
nodeKey
- the node key; may not be nullscore
- the score; must be positivepublic void add(Iterable<NodeKey> nodeKeys, float score)
ResultWriter
add
in interface ResultWriter
nodeKeys
- the node keys; may not be nullscore
- the score; must be positivepublic void add(Iterator<NodeKey> nodeKeys, float score)
ResultWriter
add
in interface ResultWriter
nodeKeys
- the node keys; may not be nullscore
- the score; must be positivepublic NodeSequence.Batch popPreloadedBatch()
public long rowCount()
protected boolean consumeOperation(Filter.Results operation)
protected NodeSequence.Batch convertToBatch(boolean isLast)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.