Annotation Type EagerInit
- 
 @Qualifier @Retention(CLASS) @Target({METHOD,PARAMETER,TYPE}) public @interface EagerInitQualifierto use onObjecttype providers to indicate the provided objects should be initialized at server startup. This is useful for dependencies used inProducerModulebecause they will not be initialized until the first usage of a producer graph. ForSingletondependencies, it is highly recommended to provide anEagerInitannotatedinitprovider that accepts the objects as dependencies.For example, {@literal @}Module public class MyModule { {@literal @}Provides {@literal @}Singleton public Database slowDatabase() { return Database.connect(); } {@literal @}Provides {@literal @}Singleton public ServerConfig serverConfig(Config config) { return config.load("server"); } {@literal @Provides} {@literal @ElementsIntoSet} {@literal @EagerInit} public Set<Object> init(Database database, ServerConfig config) { return ImmutableSet.of(database, config); } }