After postWarmup, all external servers have been started, and we can now enable our health endpoint.
After postWarmup, all external servers have been started, and we can now enable our health endpoint.
com.twitter.inject.app.App#afterPostwarmup
com.twitter.server.Lifecycle.Warmup#warmupComplete
After warmup but before accepting traffic promote to old gen (which triggers gc).
After warmup but before accepting traffic promote to old gen (which triggers gc).
com.twitter.inject.app.App#beforePostWarmup
com.twitter.server.Lifecycle.Warmup#prebindWarmup
If true, the Twitter-Server admin server will be disabled.
If true, the Twitter-Server admin server will be disabled. Note: Disabling the admin server allows services to be deployed into environments where only a single port is allowed
Utility to run a com.twitter.inject.utils.Handler.
Utility to run a com.twitter.inject.utils.Handler. This is generally used for running a warmup handler in #warmup.
- type parameter with upper-bound of com.twitter.inject.utils.Handler
com.twitter.inject.utils.Handler
Name used for registration in the com.twitter.util.registry.Library
Name used for registration in the com.twitter.util.registry.Library
library name to register in the Library registry.
If you override this method to create and bind any external interface or to instantiate any awaitable it is expected that you add the Awaitable (or com.twitter.finagle.ListeningServer) to the list of Awaitables using the <: Awaitable[_(awaitable: T): Unit]] function.
If you override this method to create and bind any external interface or to instantiate any awaitable it is expected that you add the Awaitable (or com.twitter.finagle.ListeningServer) to the list of Awaitables using the <: Awaitable[_(awaitable: T): Unit]] function.
It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.
Resolve all Finagle clients before warmup method called
Resolve all Finagle clients before warmup method called
Callback method executed after the injector is created and all lifecycle methods have fully completed.
Callback method executed after the injector is created and all lifecycle methods have fully completed. It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.
The server is signaled as STARTED prior to the execution of this callback as all lifecycle methods have successfully completed and the admin and any external interfaces have started.
This method can be used to start long-lived processes that run in separate threads from the main() thread. It is expected that you manage these threads manually, e.g., by using a com.twitter.util.FuturePool.
Any exceptions thrown in this method will result in the server exiting.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finagle.stats.StatsReceiver.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finagle.stats.StatsReceiver.
a com.twitter.inject.TwitterModule which provides a com.twitter.finagle.stats.StatsReceiver implementation.
A com.twitter.server.TwitterServer that supports injection and com.twitter.inject.TwitterModule modules.
To use, override the appropriate @Lifecycle and callback method(s). Make sure when overriding @Lifecycle methods to call the super implementation, otherwise critical lifecycle set-up may not occur causing your server to either function improperly or outright fail.
Typically, you will only need to interact with the following methods:
postWarmup -- create and bind any external interface(s). See com.twitter.inject.app.App#postWarmup start -- callback executed after the injector is created and all @Lifecycle methods have completed.