Package org.apache.cassandra.db.rows
Class AbstractRow
- java.lang.Object
-
- org.apache.cassandra.db.rows.AbstractRow
-
- All Implemented Interfaces:
java.lang.Iterable<ColumnData>
,IMeasurableMemory
,Clusterable
,Row
,Unfiltered
- Direct Known Subclasses:
BTreeRow
public abstract class AbstractRow extends java.lang.Object implements Row
Base abstract class forRow
implementations. Unless you have a very good reason not to, every row implementation should probably extend this class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.db.rows.Row
Row.Builder, Row.Deletion, Row.Merger, Row.SimpleBuilder
-
Nested classes/interfaces inherited from interface org.apache.cassandra.db.rows.Unfiltered
Unfiltered.Kind
-
-
Constructor Summary
Constructors Constructor Description AbstractRow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
digest(Digest digest)
Digest the atom using the providedDigest
.boolean
equals(java.lang.Object other)
int
hashCode()
boolean
hasInvalidDeletions()
Do a quick validation of the deletions of the unfiltered (if any)boolean
hasLiveData(long nowInSec, boolean enforceStrictLiveness)
Whether the row has some live information (i.e.boolean
isStatic()
Whether the row correspond to a static row or not.Unfiltered.Kind
kind()
The kind of the atom: either row or range tombstone marker.java.lang.String
toString()
java.lang.String
toString(TableMetadata metadata)
java.lang.String
toString(TableMetadata metadata, boolean fullDetails)
java.lang.String
toString(TableMetadata metadata, boolean includeClusterKeys, boolean fullDetails)
void
validateData(TableMetadata metadata)
Validate the data of this atom.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.rows.Row
accumulate, accumulate, accumulate, accumulate, apply, apply, cells, cellsInLegacyOrder, clone, clustering, columnCount, columnData, columns, dataSize, deletion, filter, filter, getCell, getCell, getColumnData, getComplexColumnData, hasComplex, hasComplexDeletion, hasDeletion, isEmpty, markCounterLocalToBeCleared, primaryKeyLivenessInfo, purge, purgeDataOlderThan, searchIterator, transformAndFilter, transformAndFilter, unsharedHeapSize, unsharedHeapSizeExcludingData, updateAllTimestamp, withOnlyQueriedData, withRowDeletion
-
Methods inherited from interface org.apache.cassandra.db.rows.Unfiltered
isRangeTombstoneMarker, isRow
-
-
-
-
Method Detail
-
kind
public Unfiltered.Kind kind()
Description copied from interface:Unfiltered
The kind of the atom: either row or range tombstone marker.- Specified by:
kind
in interfaceUnfiltered
-
hasLiveData
public boolean hasLiveData(long nowInSec, boolean enforceStrictLiveness)
Description copied from interface:Row
Whether the row has some live information (i.e. it's not just deletion informations).- Specified by:
hasLiveData
in interfaceRow
- Parameters:
nowInSec
- the current time to decide what is deleted and what isn'tenforceStrictLiveness
- whether the row should be purged if there is no PK liveness info, normally retrieved fromTableMetadata.enforceStrictLiveness()
- Returns:
- true if there is some live information
-
isStatic
public boolean isStatic()
Description copied from interface:Row
Whether the row correspond to a static row or not.
-
digest
public void digest(Digest digest)
Description copied from interface:Unfiltered
Digest the atom using the providedDigest
.- Specified by:
digest
in interfaceUnfiltered
- Parameters:
digest
- the {@see Digest} to use.
-
validateData
public void validateData(TableMetadata metadata)
Description copied from interface:Unfiltered
Validate the data of this atom.- Specified by:
validateData
in interfaceUnfiltered
- Parameters:
metadata
- the metadata for the table this atom is part of.
-
hasInvalidDeletions
public boolean hasInvalidDeletions()
Description copied from interface:Unfiltered
Do a quick validation of the deletions of the unfiltered (if any)- Specified by:
hasInvalidDeletions
in interfaceUnfiltered
- Returns:
- true if any deletion is invalid
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(TableMetadata metadata)
- Specified by:
toString
in interfaceUnfiltered
-
toString
public java.lang.String toString(TableMetadata metadata, boolean fullDetails)
- Specified by:
toString
in interfaceRow
- Specified by:
toString
in interfaceUnfiltered
-
toString
public java.lang.String toString(TableMetadata metadata, boolean includeClusterKeys, boolean fullDetails)
- Specified by:
toString
in interfaceUnfiltered
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-