Package com.qfs.plan
Interface IPartitionTransactionContentReader
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
APartitionTransactionContentReader,DropPartitionTransactionContentReader,IncrementalPartitionTransactionContentReader,InitialPartitionTransactionContentReader
An object responsible for reading an
IPartitionTransactionContent.
Do not keep any strong reference to this in non transient objects instance to prevent memory leaks.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Creates aIWritableRecordBlockable to be filled with the records affected by the transaction.createRecordBlock(int size) Creates aIWritableRecordBlockable to be filled with the records affected by the transaction.Gets the stream responsible for providing the records added in the partition by the transaction.Gets the stream responsible for providing the records deleted in the partition by the transaction.Gets the stream responsible for providing the records that have been dropped.Gets the pair of records stream providing the records that have been updated.
-
Method Details
-
getAddedRecordsStream
IRecordStream getAddedRecordsStream()Gets the stream responsible for providing the records added in the partition by the transaction.- Returns:
- the stream of added records, or
nullif no record has been added
-
getDeletedRecordsStream
IRecordStream getDeletedRecordsStream()Gets the stream responsible for providing the records deleted in the partition by the transaction.- Returns:
- the stream of deleted records, or
nullif no record has been deleted
-
getUpdatedRecordsStreams
IPair<IRecordStream,IRecordStream> getUpdatedRecordsStreams()Gets the pair of records stream providing the records that have been updated.The left stream contains the new records, the right stream the old ones.
- Returns:
- the pair (newValues, oldValues) of record streams providing updated records, or
nullif no update occurred
-
getDroppedContentStream
IDroppedRecordStream getDroppedContentStream()Gets the stream responsible for providing the records that have been dropped.- Returns:
- the stream of dropped records, or
nullif none have been dropped
-
createRecordBlock
Creates aIWritableRecordBlockable to be filled with the records affected by the transaction.- Parameters:
size- the size of the record block to create- Returns:
- a record block able to receive the content exposed by this reader
-
createRecordBlock
IWritableRecordBlock<IRecordReader> createRecordBlock()Creates aIWritableRecordBlockable to be filled with the records affected by the transaction.- Returns:
- a record block able to receive the content exposed by this reader
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-