org.apache.cassandra.db
Class CounterColumn
java.lang.Object
org.apache.cassandra.db.Column
org.apache.cassandra.db.CounterColumn
- All Implemented Interfaces:
- IColumn
public class CounterColumn
- extends Column
A column that represents a partitioned counter.
Constructor Summary |
CounterColumn(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp)
|
CounterColumn(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp,
long timestampOfLastDelete)
|
CounterColumn(java.nio.ByteBuffer name,
long value,
long timestamp)
|
CounterColumn(java.nio.ByteBuffer name,
long value,
long timestamp,
long timestampOfLastDelete)
|
Methods inherited from class org.apache.cassandra.db.Column |
addColumn, addColumn, getLocalDeletionTime, getMarkedForDeleteAt, getSubColumn, getSubColumns, hasExpiredTombstones, isLive, isMarkedForDelete, maxTimestamp, minTimestamp, mostRecentLiveChangeAt, name, reconcile, serializedSize, serializer, timestamp, validateName, value |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
contextManager
protected static final CounterContext contextManager
CounterColumn
public CounterColumn(java.nio.ByteBuffer name,
long value,
long timestamp)
CounterColumn
public CounterColumn(java.nio.ByteBuffer name,
long value,
long timestamp,
long timestampOfLastDelete)
CounterColumn
public CounterColumn(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp)
CounterColumn
public CounterColumn(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp,
long timestampOfLastDelete)
create
public static CounterColumn create(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp,
long timestampOfLastDelete,
boolean fromRemote)
timestampOfLastDelete
public long timestampOfLastDelete()
total
public long total()
size
public int size()
- Specified by:
size
in interface IColumn
- Overrides:
size
in class Column
diff
public IColumn diff(IColumn column)
- Specified by:
diff
in interface IColumn
- Overrides:
diff
in class Column
updateDigest
public void updateDigest(java.security.MessageDigest digest)
- Specified by:
updateDigest
in interface IColumn
- Overrides:
updateDigest
in class Column
reconcile
public IColumn reconcile(IColumn column,
Allocator allocator)
- Specified by:
reconcile
in interface IColumn
- Overrides:
reconcile
in class Column
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class Column
hashCode
public int hashCode()
- Overrides:
hashCode
in class Column
localCopy
public IColumn localCopy(ColumnFamilyStore cfs)
- Description copied from interface:
IColumn
- clones the column for the row cache, interning column names and making copies of other underlying byte buffers
- Specified by:
localCopy
in interface IColumn
- Overrides:
localCopy
in class Column
localCopy
public IColumn localCopy(ColumnFamilyStore cfs,
Allocator allocator)
- Description copied from interface:
IColumn
- clones the column for the memtable, interning column names and making copies of other underlying byte buffers.
Unlike the other localCopy, this uses Allocator to allocate values in contiguous memory regions,
which helps avoid heap fragmentation.
- Specified by:
localCopy
in interface IColumn
- Overrides:
localCopy
in class Column
getString
public java.lang.String getString(AbstractType comparator)
- Specified by:
getString
in interface IColumn
- Overrides:
getString
in class Column
serializationFlags
public int serializationFlags()
- Specified by:
serializationFlags
in interface IColumn
- Overrides:
serializationFlags
in class Column
validateFields
public void validateFields(CFMetaData metadata)
throws MarshalException
- Specified by:
validateFields
in interface IColumn
- Overrides:
validateFields
in class Column
- Throws:
MarshalException
hasNodeId
public boolean hasNodeId(NodeId id)
- Check if a given nodeId is found in this CounterColumn context.
computeOldShardMerger
public CounterColumn computeOldShardMerger()
removeOldShards
public static void removeOldShards(ColumnFamily cf,
int gcBefore)
markDeltaToBeCleared
public IColumn markDeltaToBeCleared()
Copyright © 2011 The Apache Software Foundation