Package com.apple.foundationdb.async
Interface AsyncIterable<T>
-
- Type Parameters:
T- the type of element yielded from iteration
- All Superinterfaces:
java.lang.Iterable<T>
public interface AsyncIterable<T> extends java.lang.Iterable<T>A collection of elements that can be iterated over in a non-blocking fashion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.util.List<T>>asList()Asynchronously return the results of this operation as aList.AsyncIterator<T>iterator()Gets a non-blocking iterator to be used to enumerate all values.
-
-
-
Method Detail
-
iterator
AsyncIterator<T> iterator()
Gets a non-blocking iterator to be used to enumerate all values.- Specified by:
iteratorin interfacejava.lang.Iterable<T>- Returns:
- a handle to be used for non-blocking iteration
-
asList
java.util.concurrent.CompletableFuture<java.util.List<T>> asList()
Asynchronously return the results of this operation as aList. This is added as a convenience to users and an opportunity for providers of this interface to optimize large operations.- Returns:
- a
CompletableFuturethat will be set to contents of this operation - See Also:
AsyncUtil.collect(AsyncIterable)
-
-