Search in sources :

Example 6 with NeoStoreXaDataSource

use of org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource in project graphdb by neo4j-attic.

the class TestNeoStore method initializeStores.

private void initializeStores() throws IOException {
    try {
        LockManager lockManager = getEmbeddedGraphDb().getConfig().getLockManager();
        LockReleaser lockReleaser = getEmbeddedGraphDb().getConfig().getLockReleaser();
        ds = new NeoStoreXaDataSource(MapUtil.genericMap(LockManager.class, lockManager, LockReleaser.class, lockReleaser, IdGeneratorFactory.class, ID_GENERATOR_FACTORY, FileSystemAbstraction.class, CommonFactories.defaultFileSystemAbstraction(), LogBufferFactory.class, CommonFactories.defaultLogBufferFactory(MapUtil.stringMap()), TxIdGenerator.class, TxIdGenerator.DEFAULT, "store_dir", path(), "neo_store", file("neo"), "logical_log", file("nioneo_logical.log")));
    // ds = new NeoStoreXaDataSource( file( "neo" ), file( "nioneo_logical.log" ),
    // lockManager, lockReleaser );
    } catch (InstantiationException e) {
        throw new IOException("" + e);
    }
    xaCon = (NeoStoreXaConnection) ds.getXaConnection();
    nStore = xaCon.getNodeConsumer();
    pStore = xaCon.getPropertyStore();
    relTypeStore = xaCon.getRelationshipTypeConsumer();
    rStore = xaCon.getRelationshipConsumer();
}
Also used : LockManager(org.neo4j.kernel.impl.transaction.LockManager) LockReleaser(org.neo4j.kernel.impl.core.LockReleaser) NeoStoreXaDataSource(org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource) IOException(java.io.IOException)

Aggregations

NeoStoreXaDataSource (org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource)6 XaDataSource (org.neo4j.kernel.impl.transaction.xaframework.XaDataSource)4 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 StoreId (org.neo4j.kernel.impl.nioneo.store.StoreId)2 HashSet (java.util.HashSet)1 SlaveContext (org.neo4j.com.SlaveContext)1 Pair (org.neo4j.helpers.Pair)1 Triplet (org.neo4j.helpers.Triplet)1 AbstractGraphDatabase (org.neo4j.kernel.AbstractGraphDatabase)1 LockReleaser (org.neo4j.kernel.impl.core.LockReleaser)1 LockManager (org.neo4j.kernel.impl.transaction.LockManager)1 XaDataSourceManager (org.neo4j.kernel.impl.transaction.XaDataSourceManager)1 LogBuffer (org.neo4j.kernel.impl.transaction.xaframework.LogBuffer)1