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 class
AbstractMemtable.AbstractFlushablePartitionSet<P extends Partition>
protected static class
AbstractMemtable.ColumnsCollector
protected static class
AbstractMemtable.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.ColumnsCollector
columnsCollector
protected java.util.concurrent.atomic.AtomicLong
currentOperations
protected TableMetadataRef
metadata
protected java.util.concurrent.atomic.AtomicLong
minLocalDeletionTime
protected java.util.concurrent.atomic.AtomicLong
minTimestamp
protected AbstractMemtable.StatsCollector
statsCollector
-
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 LifecycleTransaction
getFlushTransaction()
long
getMinLocalDeletionTime()
Minimum local deletion time in the memtablelong
getMinTimestamp()
Minimum timestamp of all stored dataTableMetadata
metadata()
The table's definition metadata.long
operationCount()
Number of "operations" (in the sense defined inPartitionUpdate.operationCount()
) the memtable has executed.LifecycleTransaction
setFlushTransaction(LifecycleTransaction flushTransaction)
protected static void
updateMin(java.util.concurrent.atomic.AtomicInteger minTracker, int newValue)
protected static void
updateMin(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.AtomicLong 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:Memtable
The 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:Memtable
Number of "operations" (in the sense defined inPartitionUpdate.operationCount()
) the memtable has executed.- Specified by:
operationCount
in interfaceMemtable
-
getMinTimestamp
public long getMinTimestamp()
Description copied from interface:UnfilteredSource
Minimum timestamp of all stored data- Specified by:
getMinTimestamp
in interfaceUnfilteredSource
-
getMinLocalDeletionTime
public long getMinLocalDeletionTime()
Description copied from interface:UnfilteredSource
Minimum local deletion time in the memtable- Specified by:
getMinLocalDeletionTime
in 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)
-
getFlushTransaction
public LifecycleTransaction getFlushTransaction()
- Specified by:
getFlushTransaction
in interfaceMemtable
-
setFlushTransaction
public LifecycleTransaction setFlushTransaction(LifecycleTransaction flushTransaction)
- Specified by:
setFlushTransaction
in interfaceMemtable
-
-