@Override public Properties getProperties() { // Inherit the properties from the delegate. final Properties properties = new Properties(super.getProperties()); properties.setProperty(Journal.Options.GROUP_COMMIT,"false"); return properties; }
@Override public Properties getProperties() { // Inherit the properties from the delegate. final Properties properties = new Properties(super.getProperties()); properties.setProperty(Journal.Options.GROUP_COMMIT,"true"); return properties; }
@Override public Properties getProperties() { // Inherit the properties from the delegate. final Properties properties = new Properties(super.getProperties()); properties.setProperty(Journal.Options.GROUP_COMMIT,"true"); return properties; }
@Override public Properties getProperties() { // Inherit the properties from the delegate. final Properties properties = new Properties(super.getProperties()); properties.setProperty(Journal.Options.GROUP_COMMIT,"false"); return properties; }
final Properties properties1 = new Properties(getProperties()); properties1.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, BSBMVocabulary.class.getName()); final Properties properties2 = new Properties(getProperties()); properties2.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, RDFSVocabulary.class.getName()); jnl = new Journal(getProperties());
final Properties properties1 = new Properties(getProperties()); properties1.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, BSBMVocabulary.class.getName()); final Properties properties2 = new Properties(getProperties()); properties2.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, RDFSVocabulary.class.getName()); jnl = new Journal(getProperties()); jnl = new Journal(getProperties());
/** * Basic test of the concurrent create and discovery of a KB. */ public void test_concurrentKBCreateAndDiscovery() throws Exception { final String namespace = getName(); // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); doConcurrentCreateAndDiscoveryTest(jnl, namespace); } finally { if (jnl != null) jnl.destroy(); } }
/** * Runs the concurrent KB Create and Discovery test multiple times against a * single journal, but using a distinct KB namespace for each test. * <p> * Note: This does not attempt to create the distinct KBs concurrently. */ public void test_concurrentKBCreateAndDiscoveryStressTestOnSharedJournal() throws Exception { // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); for (int i = 0; i < 100; i++) { final String namespace = getName() + "-" + i; doConcurrentCreateAndDiscoveryTest(jnl, namespace); } } finally { if (jnl != null) jnl.destroy(); } }
final Properties properties1 = new Properties(getProperties()); properties1.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, BSBMVocabulary.class.getName()); jnl = new Journal(getProperties());
/** * A non-concurrent version, just to make sure that the basic logic works. */ public void test_KBCreateAndDiscovery() throws Exception { final String namespace = getName(); // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); // KB does not exist. assertKBNotFound(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace, properties)).get(); // Attempt to discover the KB instance. assertKBExists(jnl, namespace); } finally { if (jnl != null) jnl.destroy(); } }
/** * A non-concurrent version testing both create and destroy. */ public void test_KBCreateAndDestroy() throws Exception { final String namespace = getName(); // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); // KB does not exist. assertKBNotFound(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace, properties)).get(); // Attempt to discover the KB instance. assertKBExists(jnl, namespace); // Destroy the KB instance. AbstractApiTask.submitApiTask(jnl, new DestroyKBTask(namespace)).get(); // Verify gone. assertKBNotFound(jnl, namespace); } finally { if (jnl != null) jnl.destroy(); } }
/** * A non-concurrent version with two KBs. */ public void test_2KBCreateAndDiscovery() throws Exception { final String namespace = getName(); final String namespace2 = getName()+"2"; // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); // KB does not exist. assertKBNotFound(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace, properties)).get(); assertKBExists(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace2, properties)).get(); assertKBExists(jnl, namespace2); } finally { if (jnl != null) jnl.destroy(); } }
final Properties properties1 = new Properties(getProperties()); properties1.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, BSBMVocabulary.class.getName()); final Properties properties2 = new Properties(getProperties()); properties2.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, RDFSVocabulary.class.getName()); jnl = new Journal(getProperties());
final Properties properties1 = new Properties(getProperties()); properties1.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, BSBMVocabulary.class.getName()); final Properties properties2 = new Properties(getProperties()); properties2.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, RDFSVocabulary.class.getName()); jnl = new Journal(getProperties()); jnl = new Journal(getProperties());
/** * Basic test of the concurrent create and discovery of a KB. */ public void test_concurrentKBCreateAndDiscovery() throws Exception { final String namespace = getName(); // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); doConcurrentCreateAndDiscoveryTest(jnl, namespace); } finally { if (jnl != null) jnl.destroy(); } }
final Properties properties1 = new Properties(getProperties()); properties1.setProperty(AbstractTripleStore.Options.VOCABULARY_CLASS, BSBMVocabulary.class.getName()); jnl = new Journal(getProperties());
/** * Runs the concurrent KB Create and Discovery test multiple times against a * single journal, but using a distinct KB namespace for each test. * <p> * Note: This does not attempt to create the distinct KBs concurrently. */ public void test_concurrentKBCreateAndDiscoveryStressTestOnSharedJournal() throws Exception { // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); for (int i = 0; i < 100; i++) { final String namespace = getName() + "-" + i; doConcurrentCreateAndDiscoveryTest(jnl, namespace); } } finally { if (jnl != null) jnl.destroy(); } }
/** * A non-concurrent version, just to make sure that the basic logic works. */ public void test_KBCreateAndDiscovery() throws Exception { final String namespace = getName(); // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); // KB does not exist. assertKBNotFound(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace, properties)).get(); // Attempt to discover the KB instance. assertKBExists(jnl, namespace); } finally { if (jnl != null) jnl.destroy(); } }
/** * A non-concurrent version testing both create and destroy. */ public void test_KBCreateAndDestroy() throws Exception { final String namespace = getName(); // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); // KB does not exist. assertKBNotFound(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace, properties)).get(); // Attempt to discover the KB instance. assertKBExists(jnl, namespace); // Destroy the KB instance. AbstractApiTask.submitApiTask(jnl, new DestroyKBTask(namespace)).get(); // Verify gone. assertKBNotFound(jnl, namespace); } finally { if (jnl != null) jnl.destroy(); } }
/** * A non-concurrent version with two KBs. */ public void test_2KBCreateAndDiscovery() throws Exception { final String namespace = getName(); final String namespace2 = getName()+"2"; // Inherit the properties from the delegate. final Properties properties = getProperties(); Journal jnl = null; try { // New Journal instance. jnl = new Journal(properties); // KB does not exist. assertKBNotFound(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace, properties)).get(); assertKBExists(jnl, namespace); // Create the KB instance. AbstractApiTask.submitApiTask(jnl, new CreateKBTask(namespace2, properties)).get(); assertKBExists(jnl, namespace2); } finally { if (jnl != null) jnl.destroy(); } }