• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #19763

04 Apr 2025 05:53AM UTC coverage: 88.616% (+0.02%) from 88.598%
#19763

push

github

web-flow
refactor: prevents global stats config freeze in ConfiguratorRegistry.getConfigurators() (#11991)

34742 of 39205 relevant lines covered (88.62%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.46
/../api/src/main/java/io/grpc/InternalConfiguratorRegistry.java
1
/*
2
 * Copyright 2024 The gRPC Authors
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package io.grpc;
18

19
import java.util.List;
20

21
/**
22
 * Access internal global configurators.
23
 */
24
@Internal
25
public final class InternalConfiguratorRegistry {
26
  private InternalConfiguratorRegistry() {}
27

28
  public static void setConfigurators(List<InternalConfigurator> configurators) {
29
    ConfiguratorRegistry.getDefaultRegistry().setConfigurators(configurators);
×
30
  }
×
31

32
  public static List<?> getConfigurators() {
33
    return ConfiguratorRegistry.getDefaultRegistry().getConfigurators();
×
34
  }
35

36
  public static void configureChannelBuilder(ManagedChannelBuilder<?> channelBuilder) {
37
    for (Configurator configurator : ConfiguratorRegistry.getDefaultRegistry().getConfigurators()) {
1✔
38
      configurator.configureChannelBuilder(channelBuilder);
×
39
    }
×
40
  }
1✔
41

42
  public static void configureServerBuilder(ServerBuilder<?> serverBuilder) {
43
    for (Configurator configurator : ConfiguratorRegistry.getDefaultRegistry().getConfigurators()) {
1✔
44
      configurator.configureServerBuilder(serverBuilder);
×
45
    }
×
46
  }
1✔
47

48
  public static boolean wasSetConfiguratorsCalled() {
49
    return ConfiguratorRegistry.getDefaultRegistry().wasSetConfiguratorsCalled();
1✔
50
  }
51

52
  public static int getConfiguratorsCallCountBeforeSet() {
53
    return ConfiguratorRegistry.getDefaultRegistry().getConfiguratorsCallCountBeforeSet();
×
54
  }
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc