public interface IterableQueryResult extends Iterable<Map<String,Serializable>>, Closeable
The close()
method MUST be called when the query result is no more needed, otherwise underlying resources
will be leaked. There is no auto-closing at the end of the iteration.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the query result and releases the underlying resources held by the cursor.
|
boolean |
isLife()
Deprecated.
since 8.1 (misspelled), use
mustBeClosed() instead |
boolean |
mustBeClosed()
Indicates if the query result must be closed (because it holds resources).
|
long |
pos()
Gets the current position in the iterator.
|
long |
size()
Gets the total size of the query result.
|
void |
skipTo(long pos)
Skips to a given position in the iterator.
|
forEach, iterator, spliterator
void close()
This MUST be called when the query result is no more needed, otherwise underlying resources will be leaked. There is no auto-closing at the end of the iteration.
close
in interface AutoCloseable
close
in interface Closeable
@Deprecated boolean isLife()
mustBeClosed()
insteadboolean mustBeClosed()
true
if the query result must be closed, false
otherwiselong size()
Note that this may be costly, and that some backends may not be able to do this operation, in which case
-1
will be returned.
-1
for an unknown sizelong pos()
Positions start at 0
.
void skipTo(long pos)
Positions start at 0
.
Copyright © 2017 Nuxeo. All rights reserved.