Search in sources :

Example 1 with BufferChannel

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

the class Journal method create.

public static Journal create(Location location) {
    BufferChannel chan;
    String channelName = journalFilename(location);
    if (location.isMem())
        chan = BufferChannelMem.create(channelName);
    else
        chan = BufferChannelFile.create(channelName);
    return new Journal(chan);
}
Also used : BufferChannel(org.apache.jena.tdb.base.file.BufferChannel)

Example 2 with BufferChannel

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

the class JournalControl method syncAll.

private static void syncAll(StorageConfig sConf) {
    Collection<BlockMgr> x = sConf.blockMgrs.values();
    for (BlockMgr blkMgr : x) blkMgr.syncForce();
    Collection<BufferChannel> y = sConf.bufferChannels.values();
    for (BufferChannel bChan : y) bChan.sync();
//sConf.nodeTables ;
}
Also used : BlockMgr(org.apache.jena.tdb.base.block.BlockMgr) BufferChannel(org.apache.jena.tdb.base.file.BufferChannel)

Example 3 with BufferChannel

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

the class TestJournal method before.

@Before
public void before() {
    BufferChannel mem = BufferChannelMem.create("journal");
    journal = new Journal(mem);
    bb1.clear();
    bb2.clear();
    bb3.clear();
}
Also used : BufferChannel(org.apache.jena.tdb.base.file.BufferChannel) Journal(org.apache.jena.tdb.transaction.Journal) Before(org.junit.Before)

Example 4 with BufferChannel

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

the class TestObjectFileDisk method make.

@Override
protected ObjectFile make() {
    FileOps.deleteSilent(filename);
    BufferChannel chan = BufferChannelFile.create(filename);
    // No buffering.
    return new ObjectFileStorage(chan, -1);
}
Also used : BufferChannel(org.apache.jena.tdb.base.file.BufferChannel) ObjectFileStorage(org.apache.jena.tdb.base.objectfile.ObjectFileStorage)

Aggregations

BufferChannel (org.apache.jena.tdb.base.file.BufferChannel)4 BlockMgr (org.apache.jena.tdb.base.block.BlockMgr)1 ObjectFileStorage (org.apache.jena.tdb.base.objectfile.ObjectFileStorage)1 Journal (org.apache.jena.tdb.transaction.Journal)1 Before (org.junit.Before)1