public class Column extends java.lang.Object implements OnDiskAtom
OnDiskAtom.Serializer| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_NAME_LENGTH |
protected java.nio.ByteBuffer |
name |
static ColumnSerializer |
serializer |
protected long |
timestamp |
protected java.nio.ByteBuffer |
value |
| Constructor and Description |
|---|
Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value) |
Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp) |
| Modifier and Type | Method and Description |
|---|---|
static Column |
create(boolean value,
long timestamp,
java.lang.String... names) |
static Column |
create(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp,
int ttl,
CFMetaData metadata) |
static Column |
create(java.nio.ByteBuffer value,
long timestamp,
java.lang.String... names) |
static Column |
create(double value,
long timestamp,
java.lang.String... names) |
static Column |
create(java.net.InetAddress value,
long timestamp,
java.lang.String... names) |
static Column |
create(int value,
long timestamp,
java.lang.String... names) |
static Column |
create(java.lang.String value,
long timestamp,
java.lang.String... names) |
int |
dataSize() |
Column |
diff(Column column) |
boolean |
equals(java.lang.Object o) |
int |
getLocalDeletionTime() |
long |
getMarkedForDeleteAt() |
java.lang.String |
getString(AbstractType<?> comparator) |
int |
hashCode() |
boolean |
hasIrrelevantData(int gcBefore) |
boolean |
isLive(long now) |
boolean |
isMarkedForDelete(long now) |
Column |
localCopy(ColumnFamilyStore cfs) |
Column |
localCopy(ColumnFamilyStore cfs,
Allocator allocator) |
long |
maxTimestamp() |
long |
minTimestamp()
For a standard column, this is the same as timestamp().
|
java.nio.ByteBuffer |
name() |
static java.util.Iterator<OnDiskAtom> |
onDiskIterator(java.io.DataInput in,
int count,
ColumnSerializer.Flag flag,
int expireBefore,
Descriptor.Version version)
For 2.0-formatted sstables (where column count is not stored), @param count should be Integer.MAX_VALUE,
and we will look for the end-of-row column name marker instead of relying on that.
|
static OnDiskAtom.Serializer |
onDiskSerializer() |
Column |
reconcile(Column column) |
Column |
reconcile(Column column,
Allocator allocator) |
int |
serializationFlags() |
int |
serializedSize(TypeSizes typeSizes) |
long |
serializedSizeForSSTable() |
long |
timestamp() |
void |
updateDigest(java.security.MessageDigest digest) |
void |
validateFields(CFMetaData metadata) |
protected void |
validateName(CFMetaData metadata) |
java.nio.ByteBuffer |
value() |
Column |
withUpdatedName(java.nio.ByteBuffer newName) |
Column |
withUpdatedTimestamp(long newTimestamp) |
public static final int MAX_NAME_LENGTH
public static final ColumnSerializer serializer
protected final java.nio.ByteBuffer name
protected final java.nio.ByteBuffer value
protected final long timestamp
public Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value)
public Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp)
public static OnDiskAtom.Serializer onDiskSerializer()
public static java.util.Iterator<OnDiskAtom> onDiskIterator(java.io.DataInput in, int count, ColumnSerializer.Flag flag, int expireBefore, Descriptor.Version version)
public Column withUpdatedName(java.nio.ByteBuffer newName)
public Column withUpdatedTimestamp(long newTimestamp)
public java.nio.ByteBuffer name()
name in interface OnDiskAtompublic java.nio.ByteBuffer value()
public long timestamp()
public long minTimestamp()
OnDiskAtomminTimestamp in interface OnDiskAtompublic long maxTimestamp()
maxTimestamp in interface OnDiskAtompublic boolean isMarkedForDelete(long now)
public boolean isLive(long now)
public long getMarkedForDeleteAt()
public int dataSize()
public int serializedSize(TypeSizes typeSizes)
serializedSize in interface OnDiskAtompublic long serializedSizeForSSTable()
serializedSizeForSSTable in interface OnDiskAtompublic int serializationFlags()
public void updateDigest(java.security.MessageDigest digest)
updateDigest in interface OnDiskAtompublic int getLocalDeletionTime()
getLocalDeletionTime in interface OnDiskAtompublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic Column localCopy(ColumnFamilyStore cfs)
public Column localCopy(ColumnFamilyStore cfs, Allocator allocator)
public java.lang.String getString(AbstractType<?> comparator)
protected void validateName(CFMetaData metadata) throws MarshalException
MarshalExceptionpublic void validateFields(CFMetaData metadata) throws MarshalException
validateFields in interface OnDiskAtomMarshalExceptionpublic boolean hasIrrelevantData(int gcBefore)
public static Column create(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp, int ttl, CFMetaData metadata)
public static Column create(java.lang.String value, long timestamp, java.lang.String... names)
public static Column create(int value, long timestamp, java.lang.String... names)
public static Column create(boolean value, long timestamp, java.lang.String... names)
public static Column create(double value, long timestamp, java.lang.String... names)
public static Column create(java.nio.ByteBuffer value, long timestamp, java.lang.String... names)
public static Column create(java.net.InetAddress value, long timestamp, java.lang.String... names)
Copyright © 2015 The Apache Software Foundation