Package | Description |
---|---|
java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
Flow.Processor<T,R>
A component that acts as both a Subscriber and Publisher.
|
Modifier and Type | Method and Description |
---|---|
List<Flow.Subscriber<? super T>> |
SubmissionPublisher.getSubscribers()
Returns a list of current subscribers for monitoring and
tracking purposes, not for invoking
Flow.Subscriber
methods on the subscribers. |
Modifier and Type | Method and Description |
---|---|
boolean |
SubmissionPublisher.isSubscribed(Flow.Subscriber<? super T> subscriber)
Returns true if the given Subscriber is currently subscribed.
|
void |
Flow.Publisher.subscribe(Flow.Subscriber<? super T> subscriber)
Adds the given Subscriber if possible.
|
void |
SubmissionPublisher.subscribe(Flow.Subscriber<? super T> subscriber)
Adds the given Subscriber unless already subscribed.
|
Modifier and Type | Method and Description |
---|---|
int |
SubmissionPublisher.offer(T item,
long timeout,
TimeUnit unit,
BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Publishes the given item, if possible, to each current subscriber
by asynchronously invoking its
onNext method, blocking while
resources for any subscription are unavailable, up to the
specified timeout or until the caller thread is interrupted, at
which point the given handler (if non-null) is invoked, and if it
returns true, retried once. |
int |
SubmissionPublisher.offer(T item,
BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Publishes the given item, if possible, to each current subscriber
by asynchronously invoking its
onNext method. |
Constructor and Description |
---|
SubmissionPublisher(Executor executor,
int maxBufferCapacity,
BiConsumer<? super Flow.Subscriber<? super T>,? super Throwable> handler)
Creates a new SubmissionPublisher using the given Executor for
async delivery to subscribers, with the given maximum buffer size
for each subscriber, and, if non-null, the given handler invoked
when any Subscriber throws an exception in method
onNext . |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait