lhotari commented on code in PR #24731:
URL: https://github.com/apache/pulsar/pull/24731#discussion_r2342228262
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java:
##########
@@ -422,32 +422,52 @@ public void start() throws PulsarServerException {
@Override
public void close() throws PulsarServerException {
+ close(true);
+ }
+
+ public void close(boolean waitUtilServerStop) throws PulsarServerException
{
Review Comment:
nit
```suggestion
public void close(boolean waitUntilServerStopped) throws
PulsarServerException {
```
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -478,8 +478,22 @@ public void close() throws PulsarServerException {
/**
* Close the current pulsar service. All resources are released.
+ * <p>
+ * This method is equivalent with {@code closeAsync(true)}.
+ *
+ * @see PulsarService#closeAsync(boolean)
*/
public CompletableFuture<Void> closeAsync() {
+ return closeAsync(true);
+ }
+
+ /**
+ * Close the current pulsar service.
+ *
+ * @param waitForStop if true, waits for the web service to stop before
returning from this method.
+ * @return a future which will be completed when the service is fully
closed.
+ */
+ public CompletableFuture<Void> closeAsync(boolean waitForStop) {
Review Comment:
It would be better to make the parameter explicit by renaming it to
`waitForWebServiceToStop`
```suggestion
public CompletableFuture<Void> closeAsync(boolean
waitForWebServiceToStop) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]