Package com.qfs.plan
Interface IPartitionTransactionContentReader
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
APartitionTransactionContentReader,DropPartitionTransactionContentReader,IncrementalPartitionTransactionContentReader,InitialPartitionTransactionContentReader
public interface IPartitionTransactionContentReader extends AutoCloseable
An object responsible for reading anIPartitionTransactionContent.Do not keep any strong reference to this in non transient objects instance to prevent memory leaks.
- Author:
- ActiveViam
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()IWritableRecordBlock<IRecordReader>createRecordBlock()Creates aIWritableRecordBlockable to be filled with the records affected by the transaction.IWritableRecordBlock<IRecordReader>createRecordBlock(int size)Creates aIWritableRecordBlockable to be filled with the records affected by the transaction.IRecordStreamgetAddedRecordsStream()Gets the stream responsible for providing the records added in the partition by the transaction.IRecordStreamgetDeletedRecordsStream()Gets the stream responsible for providing the records deleted in the partition by the transaction.IDroppedRecordStreamgetDroppedContentStream()Gets the stream responsible for providing the records that have been dropped.IPair<IRecordStream,IRecordStream>getUpdatedRecordsStreams()Gets the pair of records stream providing the records that have been updated.
-
-
-
Method Detail
-
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
IWritableRecordBlock<IRecordReader> createRecordBlock(int size)
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
-
-