org.apache.cassandra.db.compaction
Class AbstractCompactedRow
java.lang.Object
org.apache.cassandra.db.compaction.AbstractCompactedRow
- All Implemented Interfaces:
- java.io.Closeable
- Direct Known Subclasses:
- EchoedRow, LazilyCompactedRow, PrecompactedRow
public abstract class AbstractCompactedRow
- extends java.lang.Object
- implements java.io.Closeable
a CompactedRow is an object that takes a bunch of rows (keys + columnfamilies)
and can write a compacted version of those rows to an output stream. It does
NOT necessarily require creating a merged CF object in memory.
Method Summary |
abstract int |
columnCount()
|
abstract boolean |
isEmpty()
|
abstract long |
maxTimestamp()
|
abstract void |
update(java.security.MessageDigest digest)
update @param digest with the data bytes of the row (not including row key or row size). |
abstract long |
write(java.io.DataOutput out)
write the row (size + column index + filter + column data, but NOT row key) to @param out. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.Closeable |
close |
key
public final DecoratedKey<?> key
AbstractCompactedRow
public AbstractCompactedRow(DecoratedKey<?> key)
write
public abstract long write(java.io.DataOutput out)
throws java.io.IOException
- write the row (size + column index + filter + column data, but NOT row key) to @param out.
It is an error to call this if isEmpty is false. (Because the key is appended first,
so we'd have an incomplete row written.)
write() may change internal state; it is NOT valid to call write() or update() a second time.
- Throws:
java.io.IOException
update
public abstract void update(java.security.MessageDigest digest)
- update @param digest with the data bytes of the row (not including row key or row size).
May be called even if empty.
update() may change internal state; it is NOT valid to call write() or update() a second time.
isEmpty
public abstract boolean isEmpty()
- Returns:
- true if there are no columns in the row AND there are no row-level tombstones to be preserved
columnCount
public abstract int columnCount()
- Returns:
- the number of columns in the row
maxTimestamp
public abstract long maxTimestamp()
- Returns:
- the max column timestamp in the row or Long.MIN_VALUE if
computing this value would require extra effort we're not willing to
make.
Copyright © 2013 The Apache Software Foundation