Package org.nuxeo.ecm.core.api
Class CursorResult<C,O>
- java.lang.Object
-
- org.nuxeo.ecm.core.api.CursorResult<C,O>
-
- Type Parameters:
C- The cursor type.O- The cursor item type.
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<O>
- Direct Known Subclasses:
DefaultAuditBackend.SQLAuditCursorResult,ESAuditBackend.ESCursorResult
public class CursorResult<C,O> extends Object implements Iterator<O>, Closeable
A cursor result which holds a DB cursor and additional information to scroll this DB cursor.- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description protected intbatchSizeprotected Ccursorprotected intkeepAliveSecondsprotected longlastCallTimestamp
-
Constructor Summary
Constructors Constructor Description CursorResult(C cursor, int batchSize, int keepAliveSeconds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CAUTION: if your cursor doesn't implementCloseable, we just set the field to nullintgetBatchSize()CgetCursor()booleanhasNext()Onext()booleantimedOut()voidtouch()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
batchSize
protected final int batchSize
-
keepAliveSeconds
protected final int keepAliveSeconds
-
lastCallTimestamp
protected long lastCallTimestamp
-
-
Constructor Detail
-
CursorResult
public CursorResult(C cursor, int batchSize, int keepAliveSeconds)
-
-
Method Detail
-
getBatchSize
public int getBatchSize()
-
touch
public void touch()
-
timedOut
public boolean timedOut()
-
-