Examples of HighAvailability


Examples of org.neo4j.management.HighAvailability

    private void addTabs( ManagementAccess manager, String suffix, Map<String, JPanel> result )
    {
        result.put( "Neo4j" + suffix, add( new KernelWidget( manager ) ) );
        try
        {
            HighAvailability ha = manager.getBean( HighAvailability.class );
            if ( ha != null )
            {
                result.put( "Neo4j HA" + suffix, add( new HaWidget( manager, ha ) ) );
            }
        }
View Full Code Here

Examples of org.neo4j.management.HighAvailability

    @Test
    public void canGetHaBean() throws Exception
    {
        Neo4jManager neo4j = new Neo4jManager( db.getManagementBean( Kernel.class ) );
        HighAvailability ha = neo4j.getHighAvailabilityBean();
        assertNotNull( "could not get ha bean", ha );
        assertTrue( "single instance should be master", ha.isMaster() );
    }
View Full Code Here

Examples of org.neo4j.management.HighAvailability

    @Test
    public void canConnectToInstance() throws Exception
    {
        Neo4jManager neo4j = new Neo4jManager( db.getManagementBean( Kernel.class ) );
        HighAvailability ha = neo4j.getHighAvailabilityBean();
        InstanceInfo[] instances = ha.getInstancesInCluster();
        assertNotNull( instances );
        assertEquals( 1, instances.length );
        InstanceInfo instance = instances[0];
        assertNotNull( instance );
        Pair<Neo4jManager, HighAvailability> proc = instance.connect();
        assertNotNull( "could not connect", proc );
        neo4j = proc.first();
        ha = proc.other();
        assertNotNull( neo4j );
        assertNotNull( ha );

        instances = ha.getInstancesInCluster();
        assertNotNull( instances );
        assertEquals( 1, instances.length );
        assertEquals( instance.getAddress(), instances[0].getAddress() );
        assertEquals( instance.getInstanceId(), instances[0].getInstanceId() );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.