Package io.airlift.discovery.client

Examples of io.airlift.discovery.client.ServiceSelector


        Injector injector = app
                .strictConfig()
                .doNotInitializeLogging()
                .initialize();

        ServiceSelector selector = injector.getInstance(Key.get(ServiceSelector.class, serviceType("presto")));
        assertEquals(selector.selectAllServices().size(), 1);

        HeartbeatFailureDetector detector = injector.getInstance(HeartbeatFailureDetector.class);
        detector.updateMonitoredServices();

        assertEquals(detector.getTotalCount(), 0);
View Full Code Here


        Injector injector = app
                .strictConfig()
                .doNotInitializeLogging()
                .initialize();

        ServiceSelector selector = injector.getInstance(Key.get(ServiceSelector.class, serviceType("presto")));
        assertEquals(selector.selectAllServices().size(), 1);

        HeartbeatFailureDetector detector = injector.getInstance(HeartbeatFailureDetector.class);
        detector.updateMonitoredServices();

        assertEquals(detector.getTotalCount(), 0);
View Full Code Here

        @Override
        public MySqlDataSource get()
        {
            MySqlDataSourceConfig config = injector.getInstance(Key.get(MySqlDataSourceConfig.class, annotation));
            ServiceSelector serviceSelector = injector.getInstance(Key.get(ServiceSelector.class, serviceType(type)));
            return new MySqlDataSource(serviceSelector, config);
        }
View Full Code Here

        Injector injector = app
                .strictConfig()
                .doNotInitializeLogging()
                .initialize();

        ServiceSelector selector = injector.getInstance(Key.get(ServiceSelector.class, serviceType("presto")));
        assertEquals(selector.selectAllServices().size(), 1);

        HeartbeatFailureDetector detector = injector.getInstance(HeartbeatFailureDetector.class);
        detector.updateMonitoredServices();

        assertEquals(detector.getTotalCount(), 0);
View Full Code Here

TOP

Related Classes of io.airlift.discovery.client.ServiceSelector

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.