public abstract class AbstractMemtableWithCommitlog extends AbstractMemtable
AbstractMemtable.AbstractFlushablePartitionSet<P extends Partition>, AbstractMemtable.ColumnsCollector, AbstractMemtable.StatsCollector
Memtable.Factory, Memtable.FlushablePartitionSet<P extends Partition>, Memtable.LastCommitLogPosition, Memtable.MemoryUsage, Memtable.Owner
columnsCollector, currentOperations, metadata, minLocalDeletionTime, minTimestamp, statsCollector
NO_MIN_TIMESTAMP
Constructor and Description |
---|
AbstractMemtableWithCommitlog(TableMetadataRef metadataRef,
java.util.concurrent.atomic.AtomicReference<CommitLogPosition> commitLogLowerBound) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(OpOrder.Group opGroup,
CommitLogPosition commitLogPosition)
Decide if this memtable should take a write with the given parameters, or if the write should go to the next
memtable.
|
void |
discard()
This memtable is no longer in use or required for outstanding flushes or operations.
|
CommitLogPosition |
getApproximateCommitLogLowerBound()
Approximate commit log lower bound, <= getCommitLogLowerBound, used as a time stamp for ordering
|
CommitLogPosition |
getCommitLogLowerBound()
The commit log position at the time that this memtable was created
|
Memtable.LastCommitLogPosition |
getFinalCommitLogUpperBound()
The commit log position at the time that this memtable was switched out
|
boolean |
mayContainDataBefore(CommitLogPosition position)
True if the memtable can contain any data that was written before the given commit log position
|
void |
switchOut(OpOrder.Barrier writeBarrier,
java.util.concurrent.atomic.AtomicReference<CommitLogPosition> commitLogUpperBound)
Called to tell the memtable that it is being switched out and will be flushed (or dropped) and discarded.
|
getMinLocalDeletionTime, getMinTimestamp, metadata, operationCount, updateMin, updateMin
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMemoryUsageTo, compareTo, getFlushSet, getLiveDataSize, getMemoryUsage, isClean, localRangesUpdated, markExtraOffHeapUsed, markExtraOnHeapUsed, metadataUpdated, newMemoryUsage, partitionCount, performSnapshot, put, shouldSwitch
partitionIterator, rowIterator, rowIterator
public AbstractMemtableWithCommitlog(TableMetadataRef metadataRef, java.util.concurrent.atomic.AtomicReference<CommitLogPosition> commitLogLowerBound)
public CommitLogPosition getApproximateCommitLogLowerBound()
Memtable
public void switchOut(OpOrder.Barrier writeBarrier, java.util.concurrent.atomic.AtomicReference<CommitLogPosition> commitLogUpperBound)
Memtable
Memtable.getFlushSet(org.apache.cassandra.db.PartitionPosition, org.apache.cassandra.db.PartitionPosition)
call (if the table is not truncated or dropped), and a
Memtable.discard()
.writeBarrier
- The barrier that will signal that all writes to this memtable have completed. That is, the
point after which writes cannot be accepted by this memtable (it is permitted for writes
before this barrier to go into the next; see Memtable.accepts(org.apache.cassandra.utils.concurrent.OpOrder.Group, org.apache.cassandra.db.commitlog.CommitLogPosition)
).commitLogUpperBound
- The upper commit log position for this memtable. The value may be modified after this
call and will match the next memtable's lower commit log bound.public void discard()
Memtable
public boolean accepts(OpOrder.Group opGroup, CommitLogPosition commitLogPosition)
Memtable
Memtable.switchOut(org.apache.cassandra.utils.concurrent.OpOrder.Barrier, java.util.concurrent.atomic.AtomicReference<org.apache.cassandra.db.commitlog.CommitLogPosition>)
can be accepted, and
is also used to define a shared commit log bound as the upper for this memtable and lower for the next.public CommitLogPosition getCommitLogLowerBound()
Memtable
public Memtable.LastCommitLogPosition getFinalCommitLogUpperBound()
Memtable
public boolean mayContainDataBefore(CommitLogPosition position)
Memtable
Copyright © 2009- The Apache Software Foundation