org.apache.cassandra.db

## Class Memtable

- java.lang.Object
- - org.apache.cassandra.db.Memtable

- All Implemented Interfaces:
    java.lang.Comparable<Memtable>

      public class Memtable
      extends java.lang.Object
      implements java.lang.Comparable<Memtable>

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Memtable.LastReplayPosition`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ColumnFamilyStore` | `cfs`
    `CellNameType` | `initialComparator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Memtable(java.util.concurrent.atomic.AtomicReference<ReplayPosition> commitLogLowerBound, ColumnFamilyStore cfs)`
    `Memtable(CFMetaData metadata)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accepts(OpOrder.Group opGroup, ReplayPosition replayPosition)`
    `int` | `compareTo(Memtable that)`
    `java.lang.String` | `contents()`
    `SSTableReader` | `flush()`
    `MemtableAllocator` | `getAllocator()`
    `ColumnFamily` | `getColumnFamily(DecoratedKey key)`
    `ReplayPosition` | `getCommitLogLowerBound()`
    `java.util.Iterator<java.util.Map.Entry<DecoratedKey,ColumnFamily>>` | `getEntryIterator(RowPosition startWith, RowPosition stopAt)`
    `long` | `getLiveDataSize()`
    `long` | `getMinTimestamp()`
    `long` | `getOperations()`
    `boolean` | `isClean()`
    `boolean` | `isExpired()`
    `boolean` | `isLive()`
    `boolean` | `mayContainDataBefore(ReplayPosition position)`
    `int` | `partitionCount()`
    `void` | `setDiscarding(OpOrder.Barrier writeBarrier, java.util.concurrent.atomic.AtomicReference<ReplayPosition> lastReplayPosition)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### cfs

          public final ColumnFamilyStore cfs

    - #### initialComparator

          public final CellNameType initialComparator

  - ### Constructor Detail

    - #### Memtable

          public Memtable(java.util.concurrent.atomic.AtomicReference<ReplayPosition> commitLogLowerBound,
                          ColumnFamilyStore cfs)

    - #### Memtable

          public Memtable(CFMetaData metadata)

  - ### Method Detail

    - #### compareTo

          public int compareTo(Memtable that)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<Memtable>`

    - #### getAllocator

          public MemtableAllocator getAllocator()

    - #### getLiveDataSize

          public long getLiveDataSize()

    - #### getOperations

          public long getOperations()

    - #### setDiscarding

          public void setDiscarding(OpOrder.Barrier writeBarrier,
                                    java.util.concurrent.atomic.AtomicReference<ReplayPosition> lastReplayPosition)

    - #### accepts

          public boolean accepts(OpOrder.Group opGroup,
                                 ReplayPosition replayPosition)

    - #### getCommitLogLowerBound

          public ReplayPosition getCommitLogLowerBound()

    - #### isLive

          public boolean isLive()

    - #### isClean

          public boolean isClean()

    - #### mayContainDataBefore

          public boolean mayContainDataBefore(ReplayPosition position)

    - #### isExpired

          public boolean isExpired()

      Returns:
        true if this memtable is expired. Expiration time is determined by CF's memtable_flush_period_in_ms.

    - #### contents

          public java.lang.String contents()

    - #### partitionCount

          public int partitionCount()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getEntryIterator

          public java.util.Iterator<java.util.Map.Entry<DecoratedKey,ColumnFamily>> getEntryIterator(RowPosition startWith,
                                                                                                     RowPosition stopAt)

      Parameters:
        `startWith` - Include data in the result from and including this key and to the end of the memtable
      Returns:
        An iterator of entries with the data from the start key

    - #### getColumnFamily

          public ColumnFamily getColumnFamily(DecoratedKey key)

    - #### flush

          public SSTableReader flush()

    - #### getMinTimestamp

          public long getMinTimestamp()

Copyright © 2018 The Apache Software Foundation