resourceInserts.setAutoCommit(true);
literalInserts.setAutoCommit(true);
bnodeManager = new BNodeManager();
uriManager = new UriManager();
literalManager = new LiteralManager();
ValueTableFactory tables = createValueTableFactory();
tables.setSequenced(sequenced);
if (sequenced) {
ids = new IntegerIdSequence();
tables.setIdSequence(ids);
hashLookups = getConnection();
hashLookups.setAutoCommit(true);
hashManager = new HashManager();
hashTable = tables.createHashTable(hashLookups, hashManager.getQueue());
ids.setHashTable(hashTable);
ids.init();
hashManager.setHashTable(hashTable);
hashManager.setBNodeManager(bnodeManager);
hashManager.setLiteralManager(literalManager);
hashManager.setUriManager(uriManager);
hashManager.setIdSequence(ids);
hashManager.init();
}
else {
ids = new LongIdSequence();
ids.init();
tables.setIdSequence(ids);
}
namespaces = new NamespaceManager();
namespaces.setConnection(resourceInserts);
NamespacesTable nsTable = tables.createNamespacesTable(nsAndTableIndexes);
nsTable.initialize();
namespaces.setNamespacesTable(nsTable);
namespaces.initialize();
bnodeManager.setHashManager(hashManager);
bnodeManager.setIdSequence(ids);
uriManager.setHashManager(hashManager);
uriManager.setIdSequence(ids);
bnodeTable = tables.createBNodeTable(resourceInserts, bnodeManager.getQueue());
uriTable = tables.createURITable(resourceInserts, uriManager.getQueue());
literalManager.setHashManager(hashManager);
literalManager.setIdSequence(ids);
literalTable = tables.createLiteralTable(literalInserts, literalManager.getQueue());
literalTable.setIdSequence(ids);
vf = new RdbmsValueFactory();
vf.setDelegate(ValueFactoryImpl.getInstance());
vf.setIdSequence(ids);
uriManager.setUriTable(uriTable);