Package io.grpc.benchmarks.qps
Class AbstractConfigurationBuilder<T extends Configuration>
- java.lang.Object
-
- io.grpc.benchmarks.qps.AbstractConfigurationBuilder<T>
-
- All Implemented Interfaces:
Configuration.Builder<T>
public abstract class AbstractConfigurationBuilder<T extends Configuration> extends java.lang.Object implements Configuration.Builder<T>
Abstract base class for allConfiguration.Builders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceAbstractConfigurationBuilder.ParamA single application parameter supported by this builder.
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tbuild(java.lang.String[] args)Builds theConfigurationfrom the given command-line arguments.protected abstract Tbuild0(T config)Called bybuild(String[])after verifying that all required options have been set.protected abstract java.util.Collection<AbstractConfigurationBuilder.Param>getParams()Returns the valid parameters supported by the configuration.protected abstract TnewConfiguration()Creates a new configuration instance which will be used as the target for command-line arguments.voidprintUsage()Prints the command-line usage for the application based on the options supported by this builder.
-
-
-
Method Detail
-
build
public final T build(java.lang.String[] args)
Description copied from interface:Configuration.BuilderBuilds theConfigurationfrom the given command-line arguments.- Specified by:
buildin interfaceConfiguration.Builder<T extends Configuration>
-
printUsage
public final void printUsage()
Description copied from interface:Configuration.BuilderPrints the command-line usage for the application based on the options supported by this builder.- Specified by:
printUsagein interfaceConfiguration.Builder<T extends Configuration>
-
newConfiguration
protected abstract T newConfiguration()
Creates a new configuration instance which will be used as the target for command-line arguments.
-
getParams
protected abstract java.util.Collection<AbstractConfigurationBuilder.Param> getParams()
Returns the valid parameters supported by the configuration.
-
build0
protected abstract T build0(T config)
Called bybuild(String[])after verifying that all required options have been set. Performs any final validation and modifications to the configuration. If successful, returns the fully built configuration.
-
-