public static class BTreeRow.Builder extends java.lang.Object implements Row.Builder
Modifier and Type | Field and Description |
---|---|
protected Clustering |
clustering |
protected Row.Deletion |
deletion |
protected LivenessInfo |
primaryKeyLivenessInfo |
Modifier | Constructor and Description |
---|---|
protected |
Builder(boolean isSorted) |
protected |
Builder(boolean isSorted,
int nowInSecs) |
Modifier and Type | Method and Description |
---|---|
void |
addCell(Cell cell)
Adds a cell to this builder.
|
void |
addComplexDeletion(ColumnDefinition column,
DeletionTime complexDeletion)
Adds a complex deletion.
|
void |
addPrimaryKeyLivenessInfo(LivenessInfo info)
Adds the liveness information for the primary key columns of this row.
|
void |
addRowDeletion(Row.Deletion deletion)
Adds the deletion information for this row.
|
Row |
build()
Builds and return built row.
|
Clustering |
clustering()
The clustering for the row that is currently being built.
|
boolean |
isSorted()
Whether the builder is a sorted one or not.
|
void |
newRow(Clustering clustering)
Prepares the builder to build a new row of clustering
clustering . |
protected void |
reset() |
protected Clustering clustering
protected LivenessInfo primaryKeyLivenessInfo
protected Row.Deletion deletion
protected Builder(boolean isSorted)
protected Builder(boolean isSorted, int nowInSecs)
public boolean isSorted()
Row.Builder
isSorted
in interface Row.Builder
public void newRow(Clustering clustering)
Row.Builder
clustering
.
This should always be the first call for a given row.
newRow
in interface Row.Builder
clustering
- the clustering for the new row.public Clustering clustering()
Row.Builder
clustering
in interface Row.Builder
null
if Row.Builder.newRow(org.apache.cassandra.db.Clustering)
hasn't
yet been called.protected void reset()
public void addPrimaryKeyLivenessInfo(LivenessInfo info)
Row.Builder
addPartitionKeyLivenessInfo(LivenessInfo.NONE)
).addPrimaryKeyLivenessInfo
in interface Row.Builder
info
- the liveness information for the primary key columns of the built row.public void addRowDeletion(Row.Deletion deletion)
Row.Builder
addRowDeletion
in interface Row.Builder
deletion
- the row deletion time, or Deletion.LIVE
if the row isn't deleted.public void addCell(Cell cell)
Row.Builder
addCell
in interface Row.Builder
cell
- the cell to add.public void addComplexDeletion(ColumnDefinition column, DeletionTime complexDeletion)
Row.Builder
addComplexDeletion
in interface Row.Builder
column
- the column for which to add the complexDeletion
.complexDeletion
- the complex deletion time to add.public Row build()
Row.Builder
build
in interface Row.Builder
Copyright © 2016 The Apache Software Foundation