Class ORecordIteratorCluster<REC extends ORecord>
java.lang.Object
com.orientechnologies.orient.core.iterator.OIdentifiableIterator<REC>
com.orientechnologies.orient.core.iterator.ORecordIteratorCluster<REC>
Iterator class to browse forward and backward the records of a cluster. Once browsed in a
direction, the iterator cannot change it.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
Fields inherited from class com.orientechnologies.orient.core.iterator.OIdentifiableIterator
brokenRIDs, browsedRecords, current, currentTxEntryPosition, database, firstClusterEntry, lastClusterEntry, limit, liveUpdated, lockingStrategy, totalAvailableRecords, txEntries -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedORecordIteratorCluster(ODatabaseDocumentInternal iDatabase, int iClusterId) ORecordIteratorCluster(ODatabaseDocumentInternal iDatabase, int iClusterId, long firstClusterEntry, long lastClusterEntry) ORecordIteratorCluster(ODatabaseDocumentInternal iDatabase, int iClusterId, long firstClusterEntry, long lastClusterEntry, OStorage.LOCKING_STRATEGY iLockingStrategy) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbegin()Move the iterator to the begin of the range.booleanhasNext()booleanlast()Move the iterator to the end of the range.next()Return the element at the current position and move forward the stream to the next position available.previous()Return the element at the current position and move backward the stream to the previous position available.setLiveUpdated(boolean iLiveUpdated) Tell to the iterator that the upper limit must be checked at every cycle.Methods inherited from class com.orientechnologies.orient.core.iterator.OIdentifiableIterator
checkCurrentPosition, checkDirection, checkForSystemClusters, current, currentPosition, getBrokenRIDs, getCurrentEntry, getFetchPlan, getLimit, getRecord, getTransactionEntry, isLiveUpdated, isReuseSameRecord, iterator, nextPosition, prevPosition, readCurrentRecord, remove, resetCurrentPosition, setFetchPlan, setLimit, setReuseSameRecordMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ORecordIteratorCluster
-
ORecordIteratorCluster
public ORecordIteratorCluster(ODatabaseDocumentInternal iDatabase, int iClusterId, long firstClusterEntry, long lastClusterEntry) -
ORecordIteratorCluster
-
ORecordIteratorCluster
@Deprecated public ORecordIteratorCluster(ODatabaseDocumentInternal iDatabase, int iClusterId, long firstClusterEntry, long lastClusterEntry, OStorage.LOCKING_STRATEGY iLockingStrategy) Deprecated.
-
-
Method Details
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin classOIdentifiableIterator<REC extends ORecord>
-
hasNext
public boolean hasNext() -
previous
Return the element at the current position and move backward the stream to the previous position available.- Specified by:
previousin classOIdentifiableIterator<REC extends ORecord>- Returns:
- the previous record found, otherwise the NoSuchElementException exception is thrown when no more records are found.
-
next
Return the element at the current position and move forward the stream to the next position available.- Returns:
- the next record found, otherwise the NoSuchElementException exception is thrown when no more records are found.
-
begin
Move the iterator to the begin of the range. If no range was specified move to the first record of the cluster.- Specified by:
beginin classOIdentifiableIterator<REC extends ORecord>- Returns:
- The object itself
-
last
Move the iterator to the end of the range. If no range was specified move to the last record of the cluster.- Specified by:
lastin classOIdentifiableIterator<REC extends ORecord>- Returns:
- The object itself
-
setLiveUpdated
Tell to the iterator that the upper limit must be checked at every cycle. Useful when concurrent deletes or additions change the size of the cluster while you're browsing it. Default is false.- Overrides:
setLiveUpdatedin classOIdentifiableIterator<REC extends ORecord>- Parameters:
iLiveUpdated- True to activate it, otherwise false (default)- See Also:
-