Search in sources :

Example 36 with Record

use of org.apache.jena.dboe.base.record.Record in project jena by apache.

the class TupleIndexRecord method performDelete.

/**
 * Delete a tuple
 */
@Override
protected void performDelete(Tuple<NodeId> tuple) {
    Record r = TupleLib.record(factory, tuple, tupleMap);
    index.delete(r);
}
Also used : Record(org.apache.jena.dboe.base.record.Record)

Example 37 with Record

use of org.apache.jena.dboe.base.record.Record in project jena by apache.

the class TupleIndexRecord method performAdd.

/**
 * Insert a tuple
 */
@Override
protected void performAdd(Tuple<NodeId> tuple) {
    Record r = TupleLib.record(factory, tuple, tupleMap);
    index.insert(r);
}
Also used : Record(org.apache.jena.dboe.base.record.Record)

Example 38 with Record

use of org.apache.jena.dboe.base.record.Record in project jena by apache.

the class TestRecordBufferPage method fill.

private static void fill(RecordBuffer rb, int... nums) {
    for (int num : nums) {
        Record rec = record(num);
        rb.add(rec);
    }
}
Also used : Record(org.apache.jena.dboe.base.record.Record)

Example 39 with Record

use of org.apache.jena.dboe.base.record.Record in project jena by apache.

the class IndexMap method insert.

@Override
public boolean insert(Record record) {
    Record r = find(record);
    if (r != null && r.equals(record))
        return false;
    index.put(wrap(record.getKey()), wrap(record.getValue()));
    return true;
}
Also used : Record(org.apache.jena.dboe.base.record.Record)

Example 40 with Record

use of org.apache.jena.dboe.base.record.Record in project jena by apache.

the class IndexTestLib method testDelete.

public static void testDelete(Index index, int[] vals) {
    long size1 = index.size();
    int count = 0;
    count = delete(index, vals);
    List<Record> x = intToRecord(vals, RecordLib.TestRecordLength);
    for (Record r : x) Assert.assertFalse(index.contains(r));
    long size2 = index.size();
    assertEquals(size1 - count, size2);
}
Also used : RecordLib.intToRecord(org.apache.jena.dboe.test.RecordLib.intToRecord) Record(org.apache.jena.dboe.base.record.Record)

Aggregations

Record (org.apache.jena.dboe.base.record.Record)71 RecordLib.intToRecord (org.apache.jena.dboe.test.RecordLib.intToRecord)6 Pair (org.apache.jena.atlas.lib.Pair)5 NoSuchElementException (java.util.NoSuchElementException)3 BufferChannel (org.apache.jena.dboe.base.file.BufferChannel)3 FileSet (org.apache.jena.dboe.base.file.FileSet)3 RecordBufferPage (org.apache.jena.dboe.base.recordbuffer.RecordBufferPage)3 BPTreeNode (org.apache.jena.dboe.trans.bplustree.BPTreeNode)3 BPlusTree (org.apache.jena.dboe.trans.bplustree.BPlusTree)3 BPlusTreeParams (org.apache.jena.dboe.trans.bplustree.BPlusTreeParams)3 NodeId (org.apache.jena.tdb2.store.NodeId)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 StorageException (org.apache.jena.dboe.base.StorageException)2 BlockMgr (org.apache.jena.dboe.base.block.BlockMgr)2 RecordBuffer (org.apache.jena.dboe.base.buffer.RecordBuffer)2 RecordFactory (org.apache.jena.dboe.base.record.RecordFactory)2 Index (org.apache.jena.dboe.index.Index)2 RangeIndex (org.apache.jena.dboe.index.RangeIndex)2 TDBException (org.apache.jena.tdb2.TDBException)2