Package org.neo4j.management

Examples of org.neo4j.management.InstanceInfo


    {
        Neo4jManager neo4j = new Neo4jManager( db.getManagementBean( Kernel.class ) );
        InstanceInfo[] instances = neo4j.getHighAvailabilityBean().getInstancesInCluster();
        assertNotNull( instances );
        assertEquals( 1, instances.length );
        InstanceInfo instance = instances[0];
        assertNotNull( instance );
        String address = instance.getAddress();
        assertNotNull( "No JMX address for instance", address );
        String id = instance.getInstanceId();
        assertNotNull( "No instance id", id );
    }
View Full Code Here


        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

            ConnectionInformation[] connections = db.getBroker().getConnectionInformation();
            InstanceInfo[] result = new InstanceInfo[connections.length];
            for ( int i = 0; i < result.length; i++ )
            {
                ConnectionInformation connection = connections[i];
                result[i] = new InstanceInfo( connection.getJMXServiceURL().toString(),
                        connection.getInstanceId(), connection.getMachineId(),
                        connection.isMaster(), connection.getLastCommitedTransactionId() );
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of org.neo4j.management.InstanceInfo

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.