Package org.apache.cassandra.db.memtable
Interface Memtable.Owner
-
- All Known Implementing Classes:
ColumnFamilyStore
- Enclosing interface:
- Memtable
public static interface Memtable.Owner
Interface for providing signals back and requesting information from the owner, i.e. the object that controls the memtable. This is usually the ColumnFamilyStore; the interface is used to limit the dependency of memtables on the details of its implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Memtable
getCurrentMemtable()
Get the current memtable for this owner.java.lang.Iterable<Memtable>
getIndexMemtables()
Collect the index memtables flushed together with this.ShardBoundaries
localRangeSplits(int shardCount)
Construct a list of boundaries that split the locally-owned ranges into the given number of shards, splitting the owned space evenly.Future<CommitLogPosition>
signalFlushRequired(Memtable memtable, ColumnFamilyStore.FlushReason reason)
Signal to the owner that a flush is required (e.g.
-
-
-
Method Detail
-
signalFlushRequired
Future<CommitLogPosition> signalFlushRequired(Memtable memtable, ColumnFamilyStore.FlushReason reason)
Signal to the owner that a flush is required (e.g. in response to hitting space limits)
-
getCurrentMemtable
Memtable getCurrentMemtable()
Get the current memtable for this owner. Used to avoid capturing memtable in scheduled flush tasks.
-
getIndexMemtables
java.lang.Iterable<Memtable> getIndexMemtables()
Collect the index memtables flushed together with this. Used to accurately calculate memory that would be freed by a flush.
-
localRangeSplits
ShardBoundaries localRangeSplits(int shardCount)
Construct a list of boundaries that split the locally-owned ranges into the given number of shards, splitting the owned space evenly. It is up to the memtable to use this information. Any changes in the ring structure (e.g. added or removed nodes) will invalidate the splits; in such a case the memtable will be sent aMemtable.shouldSwitch(org.apache.cassandra.db.ColumnFamilyStore.FlushReason)
(OWNED_RANGES_CHANGE) and, should that return false, aMemtable.localRangesUpdated()
call.
-
-