public static interface Memtable.Factory
CREATE TABLE ... WITH memtable = '<configuration_name>'
where the configuration definition is a map given
under memtable_configurations
in cassandra.yaml). To make that possible, implementations must provide
either a static FACTORY
field (if they accept no further option) or a static
factory(Map<String, String>)
method. In the latter case, the method should avoid creating
multiple instances of the factory for the same parameters, or factories should at least implement hashCode and
equals.Modifier and Type | Method and Description |
---|---|
Memtable |
create(java.util.concurrent.atomic.AtomicReference<CommitLogPosition> commitLogLowerBound,
TableMetadataRef metadaRef,
Memtable.Owner owner)
Create a memtable.
|
default TableMetrics.ReleasableMetric |
createMemtableMetrics(TableMetadataRef metadataRef)
Override this method to include implementation-specific memtable metrics in the table metrics.
|
default boolean |
streamFromMemtable()
When we need to stream data, we usually flush and stream the resulting sstables.
|
default boolean |
streamToMemtable()
Normally we can receive streamed sstables directly, skipping the memtable stage (zero-copy-streaming).
|
default boolean |
writesAreDurable()
This should be true if the memtable can achieve write durability for crash recovery directly (i.e.
|
default boolean |
writesShouldSkipCommitLog()
If the memtable can achieve write durability directly (i.e.
|
Memtable create(java.util.concurrent.atomic.AtomicReference<CommitLogPosition> commitLogLowerBound, TableMetadataRef metadaRef, Memtable.Owner owner)
commitLogLowerBound
- A commit log lower bound for the new memtable. This will be equal to the previous
memtable's upper bound and defines the span of positions that any flushed sstable
will cover.metadaRef
- Pointer to the up-to-date table metadata.owner
- Owning objects that will receive flush requests triggered by the memtable (e.g. on expiration).default boolean writesShouldSkipCommitLog()
default boolean writesAreDurable()
default boolean streamToMemtable()
default boolean streamFromMemtable()
default TableMetrics.ReleasableMetric createMemtableMetrics(TableMetadataRef metadataRef)
Copyright © 2009-2022 The Apache Software Foundation