use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParams method store_params_10.
// ----
@Test
public void store_params_10() {
StoreParams params = StoreParams.builder().fileMode(FileMode.direct).blockSize(1024).build();
StoreParams params2 = roundTrip(params);
assertEqualsStoreParams(params, params2);
assertEquals(params.getFileMode(), params2.getFileMode());
assertEquals(params.getBlockSize(), params2.getBlockSize());
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParams method store_params_12.
@Test
public void store_params_12() {
String xs = "{ \"tdb.file_mode\": \"direct\" , \"tdb.block_size\": 2048 }";
JsonObject x = JSON.parse(xs);
StoreParams paramsExpected = StoreParams.builder().blockSize(2048).fileMode(FileMode.direct).build();
StoreParams paramsActual = StoreParamsCodec.decode(x);
assertEqualsStoreParams(paramsExpected, paramsActual);
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParams method store_params_21.
@Test
public void store_params_21() {
StoreParams params1 = StoreParams.builder().blockReadCacheSize(0).build();
assertTrue(params1.isSetBlockReadCacheSize());
assertFalse(params1.isSetBlockWriteCacheSize());
StoreParams params2 = StoreParams.builder(params1).blockWriteCacheSize(0).build();
assertTrue(params2.isSetBlockReadCacheSize());
assertTrue(params2.isSetBlockWriteCacheSize());
assertFalse(params2.isSetNodeMissCacheSize());
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParams method store_params_14.
@Test(expected = TDBException.class)
public void store_params_14() {
// Misspelt.
String xs = "{ \"tdb.triples_indexes\" : [ \"POS\" , \"PSO\"] } ";
JsonObject x = JSON.parse(xs);
StoreParams params = StoreParamsCodec.decode(x);
String[] expected = { "POS", "PSO" };
assertArrayEquals(expected, params.getTripleIndexes());
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParams method store_params_04.
@Test
public void store_params_04() {
StoreParams params = StoreParams.builder().build();
StoreParams params2 = roundTrip(params);
assertEqualsStoreParams(params, params2);
}
Aggregations