Search in sources :

Example 6 with Memtable

use of org.bboxdb.storage.memtable.Memtable in project bboxdb by jnidzwetzki.

the class TupleStoreInstanceManager method activateNewMemtable.

/**
 * Activate a new memtable, the old memtable is transfered into the
 * unflushed memtable list and also pushed into the flush queue
 *
 * @param newMemtable
 * @return
 */
public synchronized Memtable activateNewMemtable(final Memtable newMemtable) {
    if (memtable != null) {
        unflushedMemtables.add(memtable);
    }
    final Memtable oldMemtable = memtable;
    memtable = newMemtable;
    return oldMemtable;
}
Also used : Memtable(org.bboxdb.storage.memtable.Memtable)

Aggregations

Memtable (org.bboxdb.storage.memtable.Memtable)6 DeletedTuple (org.bboxdb.storage.entity.DeletedTuple)2 Tuple (org.bboxdb.storage.entity.Tuple)2 Test (org.junit.Test)2 StorageManagerException (org.bboxdb.storage.StorageManagerException)1 MemtableAndTupleStoreManagerPair (org.bboxdb.storage.entity.MemtableAndTupleStoreManagerPair)1 Before (org.junit.Before)1