Search in sources :

Example 1 with ExtHash

use of org.apache.jena.tdb.index.ext.ExtHash in project jena by apache.

the class TestExtHash method makeIndex.

@Override
protected Index makeIndex(int kLen, int vLen) {
    RecordFactory factory = new RecordFactory(kLen, vLen);
    BlockMgr mgr = BlockMgrFactory.createMem("EXT", 32);
    ExtHash eHash = new ExtHash(new PlainFileMem(), factory, mgr);
    return eHash;
}
Also used : RecordFactory(org.apache.jena.tdb.base.record.RecordFactory) BlockMgr(org.apache.jena.tdb.base.block.BlockMgr) ExtHash(org.apache.jena.tdb.index.ext.ExtHash) PlainFileMem(org.apache.jena.tdb.base.file.PlainFileMem)

Example 2 with ExtHash

use of org.apache.jena.tdb.index.ext.ExtHash in project jena by apache.

the class ExtHashTestBase method runTest.

public static void runTest(int[] r1, int[] r2) {
    try {
        ExtHash extHash = create(r1);
        check(extHash, r1);
        delete(extHash, r2);
        check(extHash);
    } catch (RuntimeException ex) {
        System.err.println();
        System.err.printf("int[] r1 = {%s} ;\n", strings(r1));
        System.err.printf("int[] r2 = {%s}; \n", strings(r2));
        throw ex;
    }
}
Also used : ExtHash(org.apache.jena.tdb.index.ext.ExtHash)

Example 3 with ExtHash

use of org.apache.jena.tdb.index.ext.ExtHash in project jena by apache.

the class ExtHashTestBase method create.

public static ExtHash create(int... recs) {
    ExtHash extHash = make();
    for (int i : recs) {
        Record r = intToRecord(i);
        extHash.add(r);
        if (false)
            extHash.dump();
    }
    return extHash;
}
Also used : ExtHash(org.apache.jena.tdb.index.ext.ExtHash) Record(org.apache.jena.tdb.base.record.Record)

Aggregations

ExtHash (org.apache.jena.tdb.index.ext.ExtHash)3 BlockMgr (org.apache.jena.tdb.base.block.BlockMgr)1 PlainFileMem (org.apache.jena.tdb.base.file.PlainFileMem)1 Record (org.apache.jena.tdb.base.record.Record)1 RecordFactory (org.apache.jena.tdb.base.record.RecordFactory)1