-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation taskA documentation task
Milestone
Description
Lines 121 to 130 in 313b063
/** | |
* Use this when you don't want to participate in global resources and | |
* you want to customize the creation of the managed {@code ConnectionProvider}. | |
* <p>By default, {@code ConnectionProvider.elastic("http")} is used. | |
* <p>Note that this option is ignored if {@code userGlobalResources=false} or | |
* {@link #setConnectionProvider(ConnectionProvider)} is set. | |
* @param supplier the supplier to use | |
*/ | |
public void setConnectionProviderSupplier(Supplier<ConnectionProvider> supplier) { | |
this.connectionProviderSupplier = supplier; |
I wonder whether useGlobalResources=false
option ignores connectionProviderSupplier
option or not cause the code seems it's not
Lines 262 to 289 in 313b063
public void start() { | |
synchronized (this.lifecycleMonitor) { | |
if (!this.running) { | |
if (this.useGlobalResources) { | |
Assert.isTrue(this.loopResources == null && this.connectionProvider == null, | |
"'useGlobalResources' is mutually exclusive with explicitly configured resources"); | |
HttpResources httpResources = HttpResources.get(); | |
if (this.globalResourcesConsumer != null) { | |
this.globalResourcesConsumer.accept(httpResources); | |
} | |
this.connectionProvider = httpResources; | |
this.loopResources = httpResources; | |
} | |
else { | |
if (this.loopResources == null) { | |
this.manageLoopResources = true; | |
this.loopResources = this.loopResourcesSupplier.get(); | |
} | |
if (this.connectionProvider == null) { | |
this.manageConnectionProvider = true; | |
this.connectionProvider = this.connectionProviderSupplier.get(); | |
} | |
} | |
this.running = true; | |
} | |
} | |
} |
if i'm wrong enlighten me please
thank you in advance
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation taskA documentation task