Package org.apache.druid.guice
Class StartupInjectorBuilder
java.lang.Object
org.apache.druid.guice.BaseInjectorBuilder<StartupInjectorBuilder>
org.apache.druid.guice.StartupInjectorBuilder
Create the startup injector used to "prime" the modules for the
main injector.
Servers call the forServer() method to configure server-style
properties and the server metrics. Servers must also add
org.apache.druid.initialization.ExtensionsModule which is
not visible here, and can't be added in the forServer()
method.
Tests and clients must provide properties via another mechanism.
If every test and client needs a module, it should be present here.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.inject.Injectorbuild()forTests()Configure the injector to not load server-only classes by binding those classes to providers of null values.static StringwithProperties(Properties properties) Methods inherited from class org.apache.druid.guice.BaseInjectorBuilder
add, addAll, addAll
-
Constructor Details
-
StartupInjectorBuilder
public StartupInjectorBuilder()
-
-
Method Details
-
build
public com.google.inject.Injector build()- Overrides:
buildin classBaseInjectorBuilder<StartupInjectorBuilder>
-
withProperties
-
withEmptyProperties
-
withExtensions
-
forServer
-
forTests
Configure the injector to not load server-only classes by binding those classes to providers of null values. Avoids accidental dependencies of test code on classes not intended for classes by preventing Guice from helpfully providing implicit instances. -
getVersionString
-