Class ORecordIteratorClass<REC extends ORecord>
java.lang.Object
com.orientechnologies.orient.core.iterator.OIdentifiableIterator<REC>
com.orientechnologies.orient.core.iterator.ORecordIteratorClusters<REC>
com.orientechnologies.orient.core.iterator.ORecordIteratorClass<REC>
- Direct Known Subclasses:
ORecordIteratorClassDescendentOrder
Iterator class to browse forward and backward the records of a cluster. Once browsed in a
direction, the iterator cannot change it. This iterator with "live updates" set is able to catch
updates to the cluster sizes while browsing. This is the case when concurrent clients/threads
insert and remove item in any cluster the iterator is browsing. If the cluster are hot removed by
from the database the iterator could be invalid and throw exception of cluster not found.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.core.iterator.ORecordIteratorClusters
beginRange, clusterIds, currentClusterIdx, currentRecord, endRangeFields inherited from class com.orientechnologies.orient.core.iterator.OIdentifiableIterator
brokenRIDs, browsedRecords, current, currentTxEntryPosition, database, firstClusterEntry, lastClusterEntry, limit, liveUpdated, lockingStrategy, totalAvailableRecords, txEntries -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedORecordIteratorClass(ODatabaseDocumentInternal database, OClass targetClass, boolean polymorphic) ORecordIteratorClass(ODatabaseDocumentInternal iDatabase, String iClassName, boolean iPolymorphic) ORecordIteratorClass(ODatabaseDocumentInternal iDatabase, String iClassName, boolean iPolymorphic, boolean begin) ORecordIteratorClass(ODatabaseDocumentInternal iDatabase, String iClassName, boolean iPolymorphic, OStorage.LOCKING_STRATEGY iLockingStrategy) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfig()protected booleanbooleannext()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.toString()Methods inherited from class com.orientechnologies.orient.core.iterator.ORecordIteratorClusters
begin, getBeginRange, getClusterIds, getEndRange, hasNext, hasPrevious, last, setLiveUpdated, setRange, updateClusterRangeMethods 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, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
targetClass
-
polymorphic
protected boolean polymorphic
-
-
Constructor Details
-
ORecordIteratorClass
public ORecordIteratorClass(ODatabaseDocumentInternal iDatabase, String iClassName, boolean iPolymorphic) -
ORecordIteratorClass
public ORecordIteratorClass(ODatabaseDocumentInternal iDatabase, String iClassName, boolean iPolymorphic, boolean begin) -
ORecordIteratorClass
@Deprecated public ORecordIteratorClass(ODatabaseDocumentInternal iDatabase, String iClassName, boolean iPolymorphic, OStorage.LOCKING_STRATEGY iLockingStrategy) Deprecated. -
ORecordIteratorClass
protected ORecordIteratorClass(ODatabaseDocumentInternal database, OClass targetClass, boolean polymorphic)
-
-
Method Details
-
next
Description copied from class:ORecordIteratorClustersReturn the element at the current position and move forward the stream to the next position available. -
previous
Description copied from class:ORecordIteratorClustersReturn the element at the current position and move backward the stream to the previous position available.- Overrides:
previousin classORecordIteratorClusters<REC extends ORecord>- Returns:
- the previous record found, otherwise the NoSuchElementException exception is thrown when no more records are found.
-
isPolymorphic
public boolean isPolymorphic() -
toString
- Overrides:
toStringin classORecordIteratorClusters<REC extends ORecord>
-
include
- Overrides:
includein classORecordIteratorClusters<REC extends ORecord>
-
getTargetClass
-
config
protected void config()- Overrides:
configin classORecordIteratorClusters<REC extends ORecord>
-