org.apache.cassandra.db
Class Memtable

java.lang.Object
  extended by org.apache.cassandra.db.Memtable
All Implemented Interfaces:
java.lang.Comparable<Memtable>, IFlushable

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


Field Summary
 ColumnFamilyStore cfs
           
 
Constructor Summary
Memtable(ColumnFamilyStore cfs)
           
 
Method Summary
 int compareTo(Memtable rhs)
          Compares two Memtable based on creation time.
 java.lang.String contents()
           
 void flushAndSignal(java.util.concurrent.CountDownLatch latch, java.util.concurrent.ExecutorService sorter, java.util.concurrent.ExecutorService writer)
           
 ColumnFamily getColumnFamily(DecoratedKey key)
           
 int getCurrentOperations()
           
 int getCurrentThroughput()
           
 java.util.Iterator<java.util.Map.Entry<DecoratedKey,ColumnFamily>> getEntryIterator(DecoratedKey startWith)
           
static IColumnIterator getNamesIterator(DecoratedKey key, ColumnFamily cf, NamesQueryFilter filter)
           
static IColumnIterator getSliceIterator(DecoratedKey key, ColumnFamily cf, SliceQueryFilter filter, AbstractType typeComparator)
          obtain an iterator of columns in this memtable in the specified order starting from a given column.
 java.lang.String getTableName()
           
 boolean isClean()
           
 boolean isExpired()
           
 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
Constructor Detail

Memtable

public Memtable(ColumnFamilyStore cfs)
Method Detail

compareTo

public int compareTo(Memtable rhs)
Compares two Memtable based on creation time.

Specified by:
compareTo in interface java.lang.Comparable<Memtable>
Parameters:
rhs - Memtable to compare to.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

getCurrentThroughput

public int getCurrentThroughput()

getCurrentOperations

public int getCurrentOperations()

contents

public java.lang.String contents()

flushAndSignal

public void flushAndSignal(java.util.concurrent.CountDownLatch latch,
                           java.util.concurrent.ExecutorService sorter,
                           java.util.concurrent.ExecutorService writer)
Specified by:
flushAndSignal in interface IFlushable

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(DecoratedKey startWith)
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

isClean

public boolean isClean()

getTableName

public java.lang.String getTableName()

getSliceIterator

public static IColumnIterator getSliceIterator(DecoratedKey key,
                                               ColumnFamily cf,
                                               SliceQueryFilter filter,
                                               AbstractType typeComparator)
obtain an iterator of columns in this memtable in the specified order starting from a given column.


getNamesIterator

public static IColumnIterator getNamesIterator(DecoratedKey key,
                                               ColumnFamily cf,
                                               NamesQueryFilter filter)

getColumnFamily

public ColumnFamily getColumnFamily(DecoratedKey key)

isExpired

public boolean isExpired()


Copyright © 2010 The Apache Software Foundation