Class FutureStream<T extends Resource>
java.lang.Object
org.jdrupes.builder.core.FutureStream<T>
- Type Parameters:
T- the provided resource type
Evaluate the stream from a provider asynchronously.
-
Constructor Summary
ConstructorsConstructorDescriptionFutureStream(ExecutorService executor, ResourceProvider provider, ResourceRequest<T> requested) Instantiates a new future resources. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if is provider invocation is allowed.stream()Returns the lazily evaluated stream of resources.
-
Constructor Details
-
FutureStream
public FutureStream(ExecutorService executor, ResourceProvider provider, ResourceRequest<T> requested) Instantiates a new future resources.- Parameters:
executor- the executorprovider- the providerrequested- the requested
-
-
Method Details
-
isProviderInvocationAllowed
Checks if is provider invocation is allowed. Clears the allowed flag to also detect nested invocations.- Returns:
- true, if is provider invocation allowed
-
stream
-