Search in sources :

Example 1 with SSTableCheckpointRunnable

use of org.bboxdb.storage.sstable.SSTableCheckpointRunnable in project bboxdb by jnidzwetzki.

the class DiskStorage method startCheckpointThread.

/**
 * Start the checkpoint thread for the storage
 */
private void startCheckpointThread() {
    final BBoxDBConfiguration configuration = tupleStoreManagerRegistry.getConfiguration();
    if (configuration.getStorageCheckpointInterval() > 0) {
        final int maxUncheckpointedSeconds = configuration.getStorageCheckpointInterval();
        final SSTableCheckpointRunnable ssTableCheckpointThread = new SSTableCheckpointRunnable(this, maxUncheckpointedSeconds);
        final Thread checkpointThread = new Thread(ssTableCheckpointThread);
        checkpointThread.setName("Checkpoint thread for: " + basedir);
        checkpointThread.start();
        runningThreads.add(checkpointThread);
    }
}
Also used : BBoxDBConfiguration(org.bboxdb.misc.BBoxDBConfiguration) SSTableCheckpointRunnable(org.bboxdb.storage.sstable.SSTableCheckpointRunnable)

Aggregations

BBoxDBConfiguration (org.bboxdb.misc.BBoxDBConfiguration)1 SSTableCheckpointRunnable (org.bboxdb.storage.sstable.SSTableCheckpointRunnable)1