Package org.neo4j.gds.core.loading
Interface StoreScanner.ScanCursor<Reference>
-
- All Superinterfaces:
java.lang.AutoCloseable
- Enclosing interface:
- StoreScanner<Reference>
public static interface StoreScanner.ScanCursor<Reference> extends java.lang.AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
boolean
consumeBatch(StoreScanner.RecordConsumer<Reference> consumer)
Consumes the current batch using the given consumer.boolean
reserveBatch()
Advances the underlying entity cursor to the next batch of records.
-
-
-
Method Detail
-
reserveBatch
boolean reserveBatch()
Advances the underlying entity cursor to the next batch of records.- Returns:
- true, iff the batch contains data and needs to be consumed
-
consumeBatch
boolean consumeBatch(StoreScanner.RecordConsumer<Reference> consumer)
Consumes the current batch using the given consumer. The consumer is typically an instance ofRecordsBatchBuffer
.
The method returns aboolean
to indicate whether the current batch has been completely consumed or not. This gives the consumer the option to indicate that, e.g. its buffer is full and needs to be flushed before it can continue consuming.
This is usually the case if the underlying scan returns batches that exceed the configured size of theRecordsBatchBuffer
.- Parameters:
consumer
- A consumer for the records returned by the scan, usually aRecordsBatchBuffer
.- Returns:
- true, iff the batch is completely consumed
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-