public static interface Index.Operation extends AutoCloseable
created
.
Index
implementations should create their own implementations of this interface, and ModeShape will then
periodically call getNextBatch(ResultWriter, int)
as (additional) results are needed to answer the query.
Generally, each Index.Operation
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 read 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 may 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-2014 JBoss, a division of Red Hat. All Rights Reserved.