ThrottledAsyncChecker@Private
@Unstable
public interface AsyncChecker<K,V>
Checkable. If the check is successfully scheduled then a
ListenableFuture is returned.| Modifier and Type | Method | Description |
|---|---|---|
java.util.Optional<org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture<V>> |
schedule(Checkable<K,V> target,
K context) |
Schedule an asynchronous check for the given object.
|
void |
shutdownAndWait(long timeout,
java.util.concurrent.TimeUnit timeUnit) |
Cancel all executing checks and wait for them to complete.
|
java.util.Optional<org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture<V>> schedule(Checkable<K,V> target, K context)
target - object to be checked.context - the interpretation of the context depends on the
target.of ListenableFuture that can be used to
retrieve the result of the asynchronous check.void shutdownAndWait(long timeout,
java.util.concurrent.TimeUnit timeUnit)
throws java.lang.InterruptedException
ExecutorService.awaitTermination(long, java.util.concurrent.TimeUnit) for a description of
the parameters.java.lang.InterruptedExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.