public class ComponentClosingUtils extends Object
Modifier and Type | Method and Description |
---|---|
static CompletableFuture<Void> |
closeAsyncWithTimeout(String componentName,
Runnable closingSequence,
java.time.Duration closeTimeout)
Close a component with a timeout.
|
static CompletableFuture<Void> |
closeAsyncWithTimeout(String componentName,
ThrowingRunnable<Exception> closingSequence,
java.time.Duration closeTimeout)
Close a component with a timeout.
|
public static CompletableFuture<Void> closeAsyncWithTimeout(String componentName, Runnable closingSequence, java.time.Duration closeTimeout)
componentName
- the name of the component.closingSequence
- the closing logic which is a callable that can throw exceptions.closeTimeout
- the timeout to wait for the component to close.public static CompletableFuture<Void> closeAsyncWithTimeout(String componentName, ThrowingRunnable<Exception> closingSequence, java.time.Duration closeTimeout)
componentName
- the name of the component.closingSequence
- the closing logic.closeTimeout
- the timeout to wait for the component to close.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.