return cache.get(location) ;
}
private static StoreConnection _makeAndCache(DatasetGraphTDB dsg)
{
Location location = dsg.getLocation() ;
StoreConnection sConn = cache.get(location) ;
if (sConn == null)
{
sConn = new StoreConnection(dsg) ;
sConn.forceRecoverFromJournal() ;
// boolean actionTaken = JournalControl.recoverFromJournal(dsg.getConfig(), sConn.transactionManager.getJournal()) ;
// if ( false && actionTaken )
// {
// // This should be unnecessary because we wrote the journal replay
// // via the DSG storage configuration.
// sConn.transactionManager.closedown() ;
// sConn.baseDSG.close() ;
// dsg = DatasetBuilderStd.build(location) ;
// sConn = new StoreConnection(dsg) ;
// }
if (!location.isMemUnique())
// Don't cache use-once in-memory datasets.
cache.put(location, sConn) ;
String NS = TDB.PATH ;
TransactionInfo txInfo = new TransactionInfo(sConn.transactionManager) ;
ARQMgt.register(NS + ".system:type=Transactions", txInfo) ;