Search in sources :

Example 1 with PlainFileMem

use of org.apache.jena.tdb.base.file.PlainFileMem in project jena by apache.

the class ExtHash method createMem.

/** Testing version - in-memory but inefficient as it uses a copy-in/copy-out block manager as a RAM disk*/
public static ExtHash createMem(RecordFactory factory, int bucketSizeBytes) {
    BlockMgr mgr = BlockMgrFactory.createMem("ExtHash", bucketSizeBytes);
    ExtHash eHash = new ExtHash(new PlainFileMem(), factory, mgr);
    return eHash;
}
Also used : BlockMgr(org.apache.jena.tdb.base.block.BlockMgr) PlainFileMem(org.apache.jena.tdb.base.file.PlainFileMem)

Example 2 with PlainFileMem

use of org.apache.jena.tdb.base.file.PlainFileMem 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)

Aggregations

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