//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static LoadBalancingProcessor load(org.neo4j.causalclustering.discovery.TopologyService topologyService, org.neo4j.causalclustering.core.consensus.LeaderLocator leaderLocator, org.neo4j.logging.LogProvider logProvider, org.neo4j.kernel.configuration.Config config) throws Throwable public static LoadBalancingProcessor Load( TopologyService topologyService, LeaderLocator leaderLocator, LogProvider logProvider, Config config ) { LoadBalancingPlugin plugin = FindPlugin( config ); plugin.Init( topologyService, leaderLocator, logProvider, config ); if ( config.Get( CausalClusteringSettings.load_balancing_shuffle ) ) { return new ServerShufflingProcessor( plugin ); } return plugin; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldPassClientContextToPlugin() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldPassClientContextToPlugin() { // given LoadBalancingPlugin plugin = mock(typeof(LoadBalancingPlugin)); Org.Neo4j.causalclustering.routing.load_balancing.LoadBalancingProcessor_Result result = mock(typeof(LoadBalancingPlugin.Result)); when(plugin.Run(anyMap())).thenReturn(result); GetServersProcedureForMultiDC getServers = new GetServersProcedureForMultiDC(plugin); IDictionary <string, string> clientContext = stringMap("key", "value", "key2", "value2"); // when getServers.Apply(null, new object[] { clientContext }, null); // then verify(plugin).run(clientContext); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void validate(org.neo4j.kernel.configuration.Config config, org.neo4j.logging.Log log) throws org.neo4j.graphdb.config.InvalidSettingException public static void Validate( Config config, Log log ) { LoadBalancingPlugin plugin = FindPlugin( config ); plugin.Validate( config, log ); }