Package org.apache.cassandra.db.rows
Interface RowDiffListener
-
public interface RowDiffListener
Interface that allows to act on the result of merging multiple rows. More precisely, given N rows and the result of merging them, one can callRows.diff(RowDiffListener, Row, Row...)
with aRowDiffListener
and that listener will be informed for each input row of the diff between that input and merge row.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onCell(int i, Clustering<?> clustering, Cell<?> merged, Cell<?> original)
Called for any cell that is either in the merged row or in inputi
.void
onComplexDeletion(int i, Clustering<?> clustering, ColumnMetadata column, DeletionTime merged, DeletionTime original)
Called for every (non-live) complex deletion of any complex column present in either the merged row of inputi
.void
onDeletion(int i, Clustering<?> clustering, Row.Deletion merged, Row.Deletion original)
Called for the row deletion of inputi
.void
onPrimaryKeyLivenessInfo(int i, Clustering<?> clustering, LivenessInfo merged, LivenessInfo original)
Called for the row primary key liveness info of inputi
.
-
-
-
Method Detail
-
onPrimaryKeyLivenessInfo
void onPrimaryKeyLivenessInfo(int i, Clustering<?> clustering, LivenessInfo merged, LivenessInfo original)
Called for the row primary key liveness info of inputi
.- Parameters:
i
- the input row from whichoriginal
is from.clustering
- the clustering for the row that is merged.merged
- the primary key liveness info of the merged row. Will benull
if inputi
had aLivenessInfo
, but the merged result don't (i.e. the original info has been shadowed/deleted).original
- the primary key liveness info of inputi
. May benull
if inputi
has not primary key liveness info (i.e. it hasLivenessInfo.NONE
) but the merged result has.
-
onDeletion
void onDeletion(int i, Clustering<?> clustering, Row.Deletion merged, Row.Deletion original)
Called for the row deletion of inputi
.- Parameters:
i
- the input row from whichoriginal
is from.clustering
- the clustering for the row that is merged.merged
- the deletion of the merged row. Will benull
if inputi
had deletion but the merged result doesn't (i.e. the deletion has been shadowed).original
- the deletion of inputi
. May benull
if inputi
had no deletion but the merged row has.
-
onComplexDeletion
void onComplexDeletion(int i, Clustering<?> clustering, ColumnMetadata column, DeletionTime merged, DeletionTime original)
Called for every (non-live) complex deletion of any complex column present in either the merged row of inputi
.- Parameters:
i
- the input row from whichoriginal
is from.clustering
- the clustering for the row that is merged.column
- the column for which this is a complex deletion of.merged
- the complex deletion of the merged row. Will benull
if inputi
had a complex deletion forcolumn
but the merged result doesn't (i.e. the deletion has been shadowed).original
- the complex deletion of inputi
for columncolumn
. May benull
if inputi
had no complex deletion but the merged row has.
-
onCell
void onCell(int i, Clustering<?> clustering, Cell<?> merged, Cell<?> original)
Called for any cell that is either in the merged row or in inputi
.- Parameters:
i
- the input row from whichoriginal
is from.clustering
- the clustering for the row that is merged.merged
- the cell of the merged row. Will benull
if inputi
had a cell but that cell is no present in the merged result (it has been deleted/shadowed).original
- the cell of inputi
. May benull
if inputi
had cell corresponding tomerged
.
-
-