Package org.ojalgo.type.function
Class QueuedSupplier<T>
- java.lang.Object
-
- org.ojalgo.type.function.QueuedSupplier<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Iterable<T>
,java.util.function.Supplier<T>
,AutoFunctional
,AutoSupplier<T>
final class QueuedSupplier<T> extends java.lang.Object implements AutoSupplier<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
QueuedSupplier.Worker<T>
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.Future<?>[]
myFutures
private java.util.concurrent.BlockingQueue<T>
myQueue
private java.util.function.Supplier<T>[]
mySuppliers
-
Constructor Summary
Constructors Constructor Description QueuedSupplier(java.util.concurrent.ExecutorService executor, java.util.concurrent.BlockingQueue<T> queue, java.util.function.Supplier<T>... suppliers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
drainTo(java.util.Collection<? super T> container, int maxElements)
private boolean
isDone()
T
read()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.type.function.AutoSupplier
get, iterator, processAll
-
-
-
-
Method Detail
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceAutoSupplier<T>
- Throws:
java.lang.Exception
-
drainTo
public int drainTo(java.util.Collection<? super T> container, int maxElements)
- Specified by:
drainTo
in interfaceAutoSupplier<T>
-
read
public T read()
- Specified by:
read
in interfaceAutoSupplier<T>
-
isDone
private boolean isDone()
-
-