LoopResources for
event loop threads, and ConnectionProvider for the connection pool,
within the lifecycle of a Spring ApplicationContext.
This factory implements InitializingBean and DisposableBean
and is expected typically to be declared as a Spring-managed bean.
This class is based on ReactorResourceFactory.
| Modifier and Type | Field and Description |
|---|---|
| private ConnectionProvider | |
| private Supplier | |
| private Consumer | |
| private LoopResources | |
| private Supplier | |
| private boolean | |
| private boolean | |
| private Duration | |
| private Duration | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addGlobalResourcesConsumer(Consumer<HttpResources>
the consumer to apply consumer)Add a Consumer for configuring the global Reactor Netty resources on startup. |
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public void | destroy()
Implements org. Invoked by the containing |
| public ConnectionProvider | |
| public LoopResources | |
| public boolean | |
| public void | setConnectionProvider(ConnectionProvider
the connection provider to use as is connectionProvider)Use this when you want to provide an externally managed
|
| public void | setConnectionProviderSupplier(Supplier<ConnectionProvider>
the supplier to use supplier)Use this when you don't want to participate in global resources and
you want to customize the creation of the managed |
| public void | setLoopResources(LoopResources
the loop resources to use as is loopResources)Use this option when you want to provide an externally managed
|
| public void | setLoopResourcesSupplier(Supplier<LoopResources>
the supplier to use supplier)Use this when you don't want to participate in global resources and
you want to customize the creation of the managed |
| public void | setShutdownQuietPeriod(Duration shutdownQuietPeriod)
Configure the amount of time we'll wait before shutting down resources. |
| public void | setShutdownTimeout(Duration shutdownTimeout)
Configure the maximum amount of time to wait until the disposal of the
underlying resources regardless if a task was submitted during the
|
| public void | setUseGlobalResources(boolean
whether to expose and manage the global resources useGlobalResources)Whether to use global Reactor Netty resources via |
| connectionProvider | back to summary |
|---|---|
| private ConnectionProvider connectionProvider
| |
| connectionProviderSupplier | back to summary |
|---|---|
| private Supplier<ConnectionProvider> connectionProviderSupplier | |
| globalResourcesConsumer | back to summary |
|---|---|
| private Consumer<HttpResources> globalResourcesConsumer
| |
| loopResources | back to summary |
|---|---|
| private LoopResources loopResources
| |
| loopResourcesSupplier | back to summary |
|---|---|
| private Supplier<LoopResources> loopResourcesSupplier | |
| manageConnectionProvider | back to summary |
|---|---|
| private boolean manageConnectionProvider | |
| manageLoopResources | back to summary |
|---|---|
| private boolean manageLoopResources | |
| shutdownQuietPeriod | back to summary |
|---|---|
| private Duration shutdownQuietPeriod | |
| shutdownTimeout | back to summary |
|---|---|
| private Duration shutdownTimeout | |
| useGlobalResources | back to summary |
|---|---|
| private boolean useGlobalResources | |
| ReactorNetty2ResourceFactory | back to summary |
|---|---|
| public ReactorNetty2ResourceFactory() | |
| addGlobalResourcesConsumer | back to summary |
|---|---|
| public void addGlobalResourcesConsumer(Consumer<HttpResources> consumer) Add a Consumer for configuring the global Reactor Netty resources on
startup. When this option is used,
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| destroy | back to summary |
|---|---|
| public void destroy() Implements org. Doc from org. Invoked by the containing
| |
| getConnectionProvider | back to summary |
|---|---|
| public ConnectionProvider getConnectionProvider() Return the configured | |
| getLoopResources | back to summary |
|---|---|
| public LoopResources getLoopResources() Return the configured | |
| isUseGlobalResources | back to summary |
|---|---|
| public boolean isUseGlobalResources() Whether this factory exposes the global
| |
| setConnectionProvider | back to summary |
|---|---|
| public void setConnectionProvider(ConnectionProvider connectionProvider) Use this when you want to provide an externally managed
| |
| setConnectionProviderSupplier | back to summary |
|---|---|
| public void setConnectionProviderSupplier(Supplier<ConnectionProvider> supplier) Use this when you don't want to participate in global resources and
you want to customize the creation of the managed By default, Note that this option is ignored if
| |
| setLoopResources | back to summary |
|---|---|
| public void setLoopResources(LoopResources loopResources) Use this option when you want to provide an externally managed
| |
| setLoopResourcesSupplier | back to summary |
|---|---|
| public void setLoopResourcesSupplier(Supplier<LoopResources> supplier) Use this when you don't want to participate in global resources and
you want to customize the creation of the managed By default, Note that this option is ignored if
| |
| setShutdownQuietPeriod | back to summary |
|---|---|
| public void setShutdownQuietPeriod(Duration shutdownQuietPeriod) Configure the amount of time we'll wait before shutting down resources.
If a task is submitted during the By default, this is set to
| |
| setShutdownTimeout | back to summary |
|---|---|
| public void setShutdownTimeout(Duration shutdownTimeout) Configure the maximum amount of time to wait until the disposal of the
underlying resources regardless if a task was submitted during the
By default, this is set to
| |
| setUseGlobalResources | back to summary |
|---|---|
| public void setUseGlobalResources(boolean useGlobalResources) Whether to use global Reactor Netty resources via Default is "true" in which case this factory initializes and stops the
global Reactor Netty resources within Spring's
| |