Package org.neo4j.kernel.ha.zookeeper

Examples of org.neo4j.kernel.ha.zookeeper.Machine


        ClusterManager clusterManager = new ClusterManager( from );
        Pair<String, Integer> masterServer = null;
        try
        {
            clusterManager.waitForSyncConnected();
            Machine master = clusterManager.getMaster();
            masterServer = master.getServer();
            if ( masterServer != null )
            {
                int backupPort = clusterManager.getBackupPort( master.getMachineId() );
                return String.format( ServerAddressFormat,
                        masterServer.first(), backupPort );
            }
            throw new ComException(
                    "Master couldn't be found from cluster managed by " + from );
View Full Code Here


    }

    @Override
    protected Broker makeSlaveBroker( MasterImpl master, int masterId, int id, GraphDatabaseService graphDb )
    {
        final Machine masterMachine = new Machine( masterId, -1, 1,//
                "localhost:" + Protocol.PORT );
        final Master client = new MasterClient( masterMachine, graphDb );
        return new AbstractBroker( id, graphDb )
        {
            public boolean iAmMaster()
View Full Code Here

        return storeIdSuggestion; // Master will always win
    }

    public Machine getMasterMachine()
    {
        return new Machine( getMyMachineId(), 0, 1, null );
    }
View Full Code Here

        return new Machine( getMyMachineId(), 0, 1, null );
    }

    public Pair<Master, Machine> getMaster()
    {
        return Pair.<Master, Machine>of( null, new Machine( getMyMachineId(), 0, 1, null ) );
        // throw new UnsupportedOperationException( "I am master" );
    }
View Full Code Here

        // throw new UnsupportedOperationException( "I am master" );
    }

    public Pair<Master, Machine> getMasterReally()
    {
        return Pair.<Master, Machine>of( null, new Machine( getMyMachineId(), 0, 1, null ) );
    }
View Full Code Here

    public FakeSlaveBroker( Master master, int masterMachineId, int myMachineId, GraphDatabaseService graphDb )
    {
        super( myMachineId, graphDb );
        this.master = master;
        this.masterMachine = new Machine( masterMachineId, 0, 1, null );
    }
View Full Code Here

TOP

Related Classes of org.neo4j.kernel.ha.zookeeper.Machine

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.