public static interface Filter.Results extends AutoCloseable
Filter.filter(IndexConstraints)
operation that contains the nodes that satisfy the
supplied constraints
.
ModeShape will periodically call getNextBatch(ResultWriter, int)
as (additional) results are needed to answer the
query. Generally, each Filter.Results
instance will have enough state to execute the filtering steps.
ModeShape may call this method zero or more times, based upon whether results are actually needed and in specific batch
sizes. And every time this method is called, implementations should write the next batch of nodes that satisfies the
criteria, where the number of nodes in the batch should be roughly equal to batchSize
. If the index
implementation is interacting with a remote system, then each method invocation might correspond to a single remote
request.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any and all resources for the operation.
|
boolean |
getNextBatch(ResultWriter writer,
int batchSize)
Obtain the next batch of results for the query.
|
boolean getNextBatch(ResultWriter writer, int batchSize)
writer
- the writer that this method should use to register results in the batch; never nullbatchSize
- the ideal number of node keys that are to be included in this batch; always positivevoid close()
getNextBatch(ResultWriter, int)
was never called.close
in interface AutoCloseable
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.