| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final List | |
| private Deferred | |
| private final Object | |
| private final Runnable | |
| private final int | |
| private final PromiseFactory | |
| private final U | |
| private final QueuePolicy | |
| private final PromiseFactory | |
| private final Semaphore | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | SimplePushEventSourceImpl(PromiseFactory promiseFactory, QueuePolicy<T, U> queuePolicy, U queue, int parallelism, Runnable onClose)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| private void | |
| private Promise | |
| public Promise | connectPromise()
Implements org. This method can be used to delay event generation until an event source has connected. |
| private Promise | |
| private Promise | |
| private void | |
| private Promise | |
| public void | endOfStream()
Implements org. Close this source for now, but potentially reopen it later. |
| private void | |
| public void | error(Throwable
the error t)Implements org. Close this source for now, but potentially reopen it later. |
| private void | |
| public boolean | isConnected()
Implements org. Determine whether there are any |
| public AutoCloseable | open(PushEventConsumer<? super T>
the consumer (not null) pec)Implements org. Open the asynchronous channel between the source and the consumer. |
| public void | publish(T t)
Implements org. Asynchronously publish an event to this stream and all connected
|
| private long | |
| private void |
| closed | back to summary |
|---|---|
| private boolean closed | |
| connected | back to summary |
|---|---|
| private final List<PushEventConsumer<? super T>> connected | |
| connectPromise | back to summary |
|---|---|
| private Deferred<Void> connectPromise | |
| lock | back to summary |
|---|---|
| private final Object lock | |
| onClose | back to summary |
|---|---|
| private final Runnable onClose | |
| parallelism | back to summary |
|---|---|
| private final int parallelism | |
| promiseFactory | back to summary |
|---|---|
| private final PromiseFactory promiseFactory | |
| queue | back to summary |
|---|---|
| private final U queue | |
| queuePolicy | back to summary |
|---|---|
| private final QueuePolicy<T, U> queuePolicy | |
| sameThread | back to summary |
|---|---|
| private final PromiseFactory sameThread | |
| semaphore | back to summary |
|---|---|
| private final Semaphore semaphore | |
| waitForFinishes | back to summary |
|---|---|
| private boolean waitForFinishes | |
| SimplePushEventSourceImpl | back to summary |
|---|---|
| public SimplePushEventSourceImpl(PromiseFactory promiseFactory, QueuePolicy<T, U> queuePolicy, U queue, int parallelism, Runnable onClose) | |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Close this source. Calling this method indicates that there will never be
any more events published by it. Calling this method sends a close event
to all connected consumers. After calling this method any
| |
| close | back to summary |
|---|---|
| private void close(PushEvent<T> event) | |
| closeConsumer | back to summary |
|---|---|
| private void closeConsumer(PushEventConsumer<? super T> pec, PushEvent<T> event) | |
| closedConnectPromise | back to summary |
|---|---|
| private Promise | |
| connectPromise | back to summary |
|---|---|
| public Promise Implements org. Doc from org. This method can be used to delay event generation until an event source
has connected. The returned promise will resolve as soon as one or more
The returned promise may already be resolved if this
Note that the connected consumers are able to asynchronously close their
connections to this | |
| deliver | back to summary |
|---|---|
| private Promise | |
| doCall | back to summary |
|---|---|
| private Promise | |
| doSend | back to summary |
|---|---|
| private void doSend(PushEventConsumer<? super T> pec, PushEvent<T> event) | |
| doSendWithBackPressure | back to summary |
|---|---|
| private Promise | |
| endOfStream | back to summary |
|---|---|
| public void endOfStream() Implements org. Doc from org. Close this source for now, but potentially reopen it later. Calling this
method asynchronously sends a close event to all connected consumers and
then disconnects them. Any events previously queued by the
After calling this method any
| |
| enqueueEvent | back to summary |
|---|---|
| private void enqueueEvent(PushEvent<T> event) | |
| error | back to summary |
|---|---|
| public void error(Throwable t) Implements org. Doc from org. Close this source for now, but potentially reopen it later. Calling this
method asynchronously sends an error event to all connected consumers and
then disconnects them. Any events previously queued by the
After calling this method any | |
| handleReset | back to summary |
|---|---|
| private void handleReset(boolean resetWait) | |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Implements org. Doc from org. Determine whether there are any
| |
| open | back to summary |
|---|---|
| public AutoCloseable open(PushEventConsumer<? super T> pec) throws Exception Implements org. Doc from org. Open the asynchronous channel between the source and the consumer. The
call returns an
| |
| publish | back to summary |
|---|---|
| public void publish(T t) Implements org. Doc from org. Asynchronously publish an event to this stream and all connected
| |
| safePush | back to summary |
|---|---|
| private long safePush(PushEventConsumer<? super T> pec, PushEvent<T> event) | |
| startWorker | back to summary |
|---|---|
private void startWorker()
| |