Package org.neo4j.kernel.ha

Examples of org.neo4j.kernel.ha.Broker


        {
            @Override
            HighlyAvailableGraphDatabase start( String storeDir, Map<String, String> config )
            {
                final PlaceHolderGraphDatabaseService placeHolderGraphDb = new PlaceHolderGraphDatabaseService( path.getAbsolutePath() );
                final Broker broker;
                if ( machineId == masterId )
                {
                    broker = new FakeMasterBroker( machineId, placeHolderGraphDb );
                }
                else
View Full Code Here


    {
        haDbs = haDbs != null ? haDbs : new ArrayList<GraphDatabaseService>();
        int machineId = haDbs.size()+1;
        File slavePath = dbPath( machineId );
        PlaceHolderGraphDatabaseService placeHolderDb = new PlaceHolderGraphDatabaseService( slavePath.getAbsolutePath() );
        Broker broker = makeSlaveBroker( master, 0, machineId, placeHolderDb );
        Map<String,String> cfg = new HashMap<String, String>(config);
        cfg.put( HighlyAvailableGraphDatabase.CONFIG_KEY_HA_MACHINE_ID, Integer.toString(machineId) );
        cfg.put( Config.KEEP_LOGICAL_LOGS, "true" );
        HighlyAvailableGraphDatabase db = new HighlyAvailableGraphDatabase(
                slavePath.getAbsolutePath(), cfg, wrapBrokerAndSetPlaceHolderDb( placeHolderDb, broker ) );
View Full Code Here

        int masterId = 0;
        Map<String, String> config = MapUtil.stringMap( extraConfig,
                HighlyAvailableGraphDatabase.CONFIG_KEY_HA_MACHINE_ID, String.valueOf( masterId ) );
        String path = dbPath( 0 ).getAbsolutePath();
        PlaceHolderGraphDatabaseService placeHolderDb = new PlaceHolderGraphDatabaseService( path );
        Broker broker = makeMasterBroker( master, masterId, placeHolderDb );
        HighlyAvailableGraphDatabase db = new HighlyAvailableGraphDatabase( path,
                config, wrapBrokerAndSetPlaceHolderDb( placeHolderDb, broker ) );
        placeHolderDb.setDb( db );
        // db.newMaster( null, new Exception() );
        master = new MasterImpl( db );
View Full Code Here

TOP

Related Classes of org.neo4j.kernel.ha.Broker

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.