Class AutoCloseableFutureListWithCompletionBarrier
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Future<Void>>
-
- io.github.fastclasspathscanner.utils.AutoCloseableFutureListWithCompletionBarrier
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
,Cloneable
,Iterable<Future<Void>>
,Collection<Future<Void>>
,List<Future<Void>>
,RandomAccess
public class AutoCloseableFutureListWithCompletionBarrier extends ArrayList<Future<Void>> implements AutoCloseable
An AutoCloseable list ofFuture<Void>
items that can be used in a try-with-resources block. When close() is called on this list, all items'get()
methods are called, implementing a completion barrier.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description AutoCloseableFutureListWithCompletionBarrier(int size, LogNode log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Completion barrier.-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.util.AbstractList
equals, hashCode
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from interface java.util.Collection
parallelStream, stream
-
Methods inherited from interface java.util.List
containsAll, equals, hashCode
-
-
-
-
Constructor Detail
-
AutoCloseableFutureListWithCompletionBarrier
public AutoCloseableFutureListWithCompletionBarrier(int size, LogNode log)
-
-
Method Detail
-
close
public void close()
Completion barrier.- Specified by:
close
in interfaceAutoCloseable
-
-