Class SkipListMemtableFactory

java.lang.Object
org.apache.cassandra.db.memtable.SkipListMemtableFactory
All Implemented Interfaces:
Memtable.Factory

public class SkipListMemtableFactory extends Object implements Memtable.Factory
This class makes better sense as an inner class to SkipListMemtable (which could be as simple as FACTORY = SkipListMemtable::new), but having it there causes the SkipListMemtable class to be initialized the first time it is referenced (e.g. during default memtable factory construction). Some tests want to setup table parameters before initializing DatabaseDescriptor -- this allows them to do so, and also makes sure the memtable memory pools are not created for offline tools.
  • Field Details

  • Constructor Details

    • SkipListMemtableFactory

      public SkipListMemtableFactory()
  • Method Details

    • create

      public Memtable create(AtomicReference<CommitLogPosition> commitLogLowerBound, TableMetadataRef metadaRef, Memtable.Owner owner)
      Description copied from interface: Memtable.Factory
      Create a memtable.
      Specified by:
      create in interface Memtable.Factory
      Parameters:
      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).