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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) FutureLinkedList.Node(package private) FutureLinkedList.Node -
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.private voidremove(FutureLinkedList.Node node)
-
Field Details
-
head
-
tail
-
-
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. -
remove
-