public static class Row.Deletion
extends java.lang.Object
A row deletion mostly consists of the time of said deletion, but there is 2 variants: shadowable and regular row deletion.
A shadowable row deletion only exists if the row has no timestamp. In other words, the deletion is only valid as long as no newer insert is done (thus setting a row timestap; note that if the row timestamp set is lower than the deletion, it is shadowed (and thus ignored) as usual).
That is, if a row has a shadowable deletion with timestamp A and an update is madeto that row with a timestamp B such that B > A (and that update sets the row timestamp), then the shadowable deletion is 'shadowed' by that update. A concrete consequence is that if said update has cells with timestamp lower than A, then those cells are preserved(since the deletion is removed), and this contrarily to a normal (regular) deletion where the deletion is preserved and such cells are removed.
Currently, the only use of shadowable row deletions is Materialized Views, see CASSANDRA-10261.
Modifier and Type | Field and Description |
---|---|
static Row.Deletion |
LIVE |
Constructor and Description |
---|
Deletion(DeletionTime time,
boolean isShadowable) |
Modifier and Type | Method and Description |
---|---|
int |
dataSize() |
boolean |
deletes(Cell cell) |
boolean |
deletes(LivenessInfo info) |
void |
digest(java.security.MessageDigest digest) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isLive()
Wether the deletion is live or not, that is if its an actual deletion or not.
|
boolean |
isShadowable()
Whether the deletion is a shadowable one or not.
|
boolean |
isShadowedBy(LivenessInfo primaryKeyLivenessInfo) |
static Row.Deletion |
regular(DeletionTime time) |
static Row.Deletion |
shadowable(DeletionTime time) |
boolean |
supersedes(DeletionTime that) |
boolean |
supersedes(Row.Deletion that) |
DeletionTime |
time()
The time of the row deletion.
|
java.lang.String |
toString() |
public static final Row.Deletion LIVE
public Deletion(DeletionTime time, boolean isShadowable)
public static Row.Deletion regular(DeletionTime time)
public static Row.Deletion shadowable(DeletionTime time)
public DeletionTime time()
public boolean isShadowable()
isLive()
, then this is
guarantee to return false
.public boolean isLive()
true
if this represents no deletion of the row, false
if that's an actual
deletion.public boolean supersedes(DeletionTime that)
public boolean supersedes(Row.Deletion that)
public boolean isShadowedBy(LivenessInfo primaryKeyLivenessInfo)
public boolean deletes(LivenessInfo info)
public boolean deletes(Cell cell)
public void digest(java.security.MessageDigest digest)
public int dataSize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2017 The Apache Software Foundation