Package org.neo4j.kernel.impl.nioneo.store

Examples of org.neo4j.kernel.impl.nioneo.store.NeoStore


    }

    void init() {
        inserter = (BatchInserterImpl) BatchInserters.inserter(storeDir, config);
        nodeStructFactory.init(inserter);
        NeoStore neoStore = inserter.getNeoStore();
        neoStore.getNodeStore().setHighId(nodesToCreate + 1);
        final int processors = Runtime.getRuntime().availableProcessors();
        executor = processors >=8 ? Executors.newFixedThreadPool(processors*2) : Executors.newCachedThreadPool();

        disruptor = new Disruptor<NodeStruct>(nodeStructFactory, executor, new SingleThreadedClaimStrategy(ringSize), new YieldingWaitStrategy());
        disruptor.handleExceptionsWith(new BatchInserterExceptionHandler());
View Full Code Here


    }

    void init() {
        inserter = (BatchInserterImpl) BatchInserters.inserter(storeDir, config);
        nodeStructFactory.init(inserter);
        NeoStore neoStore = inserter.getNeoStore();
        neoStore.getNodeStore().setHighId(nodesToCreate + 1);
        executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
        //final ExecutorService executor = Executors.newCachedThreadPool();

        incomingEventDisruptor = new Disruptor<NodeStruct>(nodeStructFactory, executor, new SingleThreadedClaimStrategy(RING_SIZE), new YieldingWaitStrategy());
View Full Code Here

        //this is a nasty hack because the Neo4j API for this is quite closed:
        try {
            Field neoStoreField = BatchInserterImpl.class.getDeclaredField("neoStore");
            neoStoreField.setAccessible(true);
            NeoStore neoStore = (NeoStore) neoStoreField.get(wrapped);
            highId = neoStore.getNodeStore().getHighId();
        } catch (NoSuchFieldException e) {
            throw new RuntimeException("No field named neoStore in BatchInserterImpl. This is a bug.");
        } catch (IllegalAccessException e) {
            throw new RuntimeException("Illegal access to neoStore in BatchInserterImpl. This is a bug.");
        }
View Full Code Here

            msgLog.logMessage( "Creating new db @ " + store, true );
            autoCreatePath( store );
            NeoStore.createStore( store, config );
        }

        neoStore = new NeoStore( config );
        xaContainer = XaContainer.create( this, (String) config.get( "logical_log" ),
                new CommandFactory( neoStore ), new TransactionFactory(), config );

        if ( !readOnly )
        {
View Full Code Here

        if ( dump )
        {
            Config.dumpConfiguration( params );
        }
        msgLog.logMessage( Thread.currentThread() + " Starting BatchInserter(" + this + ")" );
        neoStore = new NeoStore( params );
        if ( !neoStore.isStoreOk() )
        {
            throw new IllegalStateException( storeDir + " store is not cleanly shutdown." );
        }
        neoStore.makeStoreOk();
View Full Code Here

TOP

Related Classes of org.neo4j.kernel.impl.nioneo.store.NeoStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.