Package io.grpc.xds

Class XdsServerBuilder

    • Method Detail

      • drainGraceTime

        public XdsServerBuilder drainGraceTime​(long drainGraceTime,
                                               TimeUnit drainGraceTimeUnit)
        Sets the grace time when draining connections with outdated configuration. When an xDS config update changes connection configuration, pre-existing connections stop accepting new RPCs to be replaced by new connections. RPCs on those pre-existing connections have the grace time to complete. RPCs that do not complete in time will be cancelled, allowing the connection to terminate. Long.MAX_VALUE nano seconds or an unreasonably large value are considered infinite. The default is 10 minutes.
      • childChannelConfigurator

        public XdsServerBuilder childChannelConfigurator​(ChannelConfigurator channelConfigurator)
        Sets the configurator that will be stored in the server built by this builder.

        This configurator will subsequently be used to configure any child channels created by that server.

        Parameters:
        channelConfigurator - the configurator to store in the channel.
        Returns:
        this
      • ldsResourceNameResolver

        public XdsServerBuilder ldsResourceNameResolver​(Function<String,​String> ldsResourceNameResolver)
        Provides a function that takes the listening address and returns the LDS resource name. When provided, this overrides the server_listener_resource_name_template in the bootstrap.
      • overrideBootstrapForTest

        public XdsServerBuilder overrideBootstrapForTest​(Map<String,​?> bootstrapOverride)
        Allows providing bootstrap override, useful for testing.
      • transportBuilder

        public ServerBuilder<?> transportBuilder()
        Returns the delegate NettyServerBuilder to allow experimental level transport-specific configuration. Note this API will always be experimental.