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.
It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.
,You MUST call super.afterPostWarmup()
in any overridden definition of this
method. Failure to do so may cause your server to not completely startup.
com.twitter.inject.app.App#afterPostwarmup
com.twitter.server.Lifecycle.Warmup#warmupComplete
Callback to register multiple Awaitable instances for the server to await (block) on.
Callback to register multiple Awaitable instances for the server to await (block) on.
vararg list of Awaitable instances to register.
Awaitable)
Callback to register an Awaitable instance for the server to await (block) on.
Callback to register an Awaitable instance for the server to await (block) on.
All registered Awaitable instances are entangled by the server such that if any registered Awaitable exits it will trigger all registered Awaitable instances to exit.
an Awaitable instance to register.
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).
It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.
,You MUST call super.beforePostWarmup()
in any overridden definition of this
method. Failure to do so may cause your server to not completely startup.
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 TwitterServer.warmup.
- type parameter with upper-bound of 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.
After creation of the Injector.
After creation of the Injector. Before any other lifecycle methods.
It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.
,You MUST call super.postInjectorStartup()
in any overridden definition of this
method. Failure to do so may cause your server to not completely startup.
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.
,You MUST call super.postWarmup()
in any overridden definition of this
method. Failure to do so may cause your server to not completely startup.
Resolve all Finagle clients before warmup method called
Resolve all Finagle clients before warmup method called
Callback method which is executed specifically in the postInjectorStartup
lifecycle
phase of this server.
Callback method which is executed specifically in the postInjectorStartup
lifecycle
phase of this server.
This is AFTER the injector is created but BEFORE server warmup has been performed.
This method is thus suitable for starting and awaiting on PubSub publishers or subscribers.
The server is NOT signaled to be started until AFTER this method has executed thus it is imperative that this method is NOT BLOCKED as it will cause the server to not complete startup.
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.
If you override this method to instantiate any com.twitter.util.Awaitable it is expected
that you add the com.twitter.util.Awaitable to the list of Awaitables
using the
<: Awaitable[_(awaitable: T): Unit]] function if you want the server to exit
when the com.twitter.util.Awaitable exits.
Any exceptions thrown in this method will result in the server exiting.
Callback method which is executed after the injector is created and all lifecycle methods have fully completed but before awaiting on any Awaitables.
Callback method which is executed after the injector is created and all lifecycle methods have fully completed but before awaiting on any Awaitables. 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.
Callback method run before TwitterServer.postWarmup, used for performing warm up of this server.
Callback method run before TwitterServer.postWarmup, used for performing warm up of this server.
Override, but do not call super.warmup()
as you will trigger a lint rule violation.
Any exceptions thrown in this method will result in the app exiting.
AbstractTwitterServer for usage from Java