Package org.apache.cassandra.db.memtable
Class AbstractMemtable
- java.lang.Object
-
- org.apache.cassandra.db.memtable.AbstractMemtable
-
- All Implemented Interfaces:
java.lang.Comparable<Memtable>,Memtable,UnfilteredSource
- Direct Known Subclasses:
AbstractMemtableWithCommitlog
public abstract class AbstractMemtable extends java.lang.Object implements Memtable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractMemtable.AbstractFlushablePartitionSet<P extends Partition>protected static classAbstractMemtable.ColumnsCollectorprotected static classAbstractMemtable.StatsCollector-
Nested classes/interfaces inherited from interface org.apache.cassandra.db.memtable.Memtable
Memtable.Factory, Memtable.FlushablePartitionSet<P extends Partition>, Memtable.LastCommitLogPosition, Memtable.MemoryUsage, Memtable.Owner
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractMemtable.ColumnsCollectorcolumnsCollectorprotected java.util.concurrent.atomic.AtomicLongcurrentOperationsprotected TableMetadataRefmetadataprotected java.util.concurrent.atomic.AtomicIntegerminLocalDeletionTimeprotected java.util.concurrent.atomic.AtomicLongminTimestampprotected AbstractMemtable.StatsCollectorstatsCollector-
Fields inherited from interface org.apache.cassandra.db.memtable.Memtable
NO_MIN_TIMESTAMP
-
-
Constructor Summary
Constructors Constructor Description AbstractMemtable(TableMetadataRef metadataRef)AbstractMemtable(TableMetadataRef metadataRef, long minTimestamp)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMinLocalDeletionTime()Minimum local deletion time in the memtablelonggetMinTimestamp()Returns the minTS if one available, otherwise NO_MIN_TIMESTAMP.TableMetadatametadata()The table's definition metadata.longoperationCount()Number of "operations" (in the sense defined inPartitionUpdate.operationCount()) the memtable has executed.protected static voidupdateMin(java.util.concurrent.atomic.AtomicInteger minTracker, int newValue)protected static voidupdateMin(java.util.concurrent.atomic.AtomicLong minTracker, long newValue)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.memtable.Memtable
accepts, addMemoryUsageTo, compareTo, discard, getApproximateCommitLogLowerBound, getCommitLogLowerBound, getFinalCommitLogUpperBound, getFlushSet, getLiveDataSize, isClean, localRangesUpdated, markExtraOffHeapUsed, markExtraOnHeapUsed, mayContainDataBefore, metadataUpdated, partitionCount, performSnapshot, put, shouldSwitch, switchOut
-
Methods inherited from interface org.apache.cassandra.db.rows.UnfilteredSource
partitionIterator, rowIterator, rowIterator
-
-
-
-
Field Detail
-
currentOperations
protected final java.util.concurrent.atomic.AtomicLong currentOperations
-
columnsCollector
protected final AbstractMemtable.ColumnsCollector columnsCollector
-
statsCollector
protected final AbstractMemtable.StatsCollector statsCollector
-
minTimestamp
protected java.util.concurrent.atomic.AtomicLong minTimestamp
-
minLocalDeletionTime
protected java.util.concurrent.atomic.AtomicInteger minLocalDeletionTime
-
metadata
protected TableMetadataRef metadata
-
-
Constructor Detail
-
AbstractMemtable
public AbstractMemtable(TableMetadataRef metadataRef)
-
AbstractMemtable
public AbstractMemtable(TableMetadataRef metadataRef, long minTimestamp)
-
-
Method Detail
-
metadata
public TableMetadata metadata()
Description copied from interface:MemtableThe table's definition metadata. Note that this tracks the current state of the table and is not necessarily the same as what was used to create the memtable.
-
operationCount
public long operationCount()
Description copied from interface:MemtableNumber of "operations" (in the sense defined inPartitionUpdate.operationCount()) the memtable has executed.- Specified by:
operationCountin interfaceMemtable
-
getMinTimestamp
public long getMinTimestamp()
Returns the minTS if one available, otherwise NO_MIN_TIMESTAMP. EncodingStats uses a synthetic epoch TS at 2015. We don't want to leak that (CASSANDRA-18118) so we return NO_MIN_TIMESTAMP instead.- Specified by:
getMinTimestampin interfaceUnfilteredSource- Returns:
- The minTS or NO_MIN_TIMESTAMP if none available
-
getMinLocalDeletionTime
public int getMinLocalDeletionTime()
Description copied from interface:UnfilteredSourceMinimum local deletion time in the memtable- Specified by:
getMinLocalDeletionTimein interfaceUnfilteredSource
-
updateMin
protected static void updateMin(java.util.concurrent.atomic.AtomicLong minTracker, long newValue)
-
updateMin
protected static void updateMin(java.util.concurrent.atomic.AtomicInteger minTracker, int newValue)
-
-