Class FutureLinkedList
java.lang.Object
dev.failsafe.internal.util.FutureLinkedList
A LinkedList of CompletableFutures that removes a future from the list when it's completed.
This class is threadsafe.
- Author:
- Jonathan Halterman
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd()Adds a new CompletableFuture to the list and returns it.Returns and removes the first future in the list, else returnsnullif the list is empty.
-
Constructor Details
-
FutureLinkedList
public FutureLinkedList()
-
-
Method Details
-
add
Adds a new CompletableFuture to the list and returns it. The returned future will be removed from the list when it's completed. -
pollFirst
Returns and removes the first future in the list, else returnsnullif the list is empty.
-