Package akka.stream.impl
Interface SubscriberManagement<T>
-
- All Superinterfaces:
ResizableMultiReaderRingBuffer.Cursors
- All Known Implementing Classes:
FanoutOutputs
public interface SubscriberManagement<T> extends ResizableMultiReaderRingBuffer.Cursors
called when we are ready to consume more elements from our upstream MUST NOT call pushToDownstream
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSubscriberManagement.Completed$static interfaceSubscriberManagement.EndOfStreamstatic classSubscriberManagement.ErrorCompletedstatic classSubscriberManagement.ErrorCompleted$static classSubscriberManagement.NotReached$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabortDownstream(java.lang.Throwable cause)this method must be called by the implementing class to push an error downstreamvoidaddSubscription(org.reactivestreams.Subscriber<? super T> subscriber)java.lang.StringbufferDebug()voidcancelUpstream()called beforeshutdown()if the stream is *not* being regularly completed but shut-down due to the last subscriber having canceled its subscriptionvoidcompleteDownstream()this method must be called by the implementing class whenever it has been determined that no more elements will be producedSubscriptionWithCursorcreateSubscription(org.reactivestreams.Subscriber<? super T> subscriber)Use to register a subscriberscala.collection.immutable.List<SubscriptionWithCursor>cursors()voidendOfStream_$eq(SubscriberManagement.EndOfStream x$1)intinitialBufferSize()intmaxBufferSize()voidmoreRequested(SubscriptionWithCursor subscription, long elements)more demand was signaled from a given subscribervoidpendingFromUpstream_$eq(long x$1)voidpushToDownstream(T value)this method must be called by the implementing class whenever a new value is available to be pushed downstreamvoidregisterSubscriber(org.reactivestreams.Subscriber<? super T> subscriber)Register a new subscriber.voidrequestFromUpstream(long elements)called when we are ready to consume more elements from our upstream MUST NOT call pushToDownstreamvoidrequestFromUpstreamIfRequired()voidshutdown(boolean completed)called when the spi.Publisher/Processor is ready to be shut downvoidsubscriptions_$eq(scala.collection.immutable.List<SubscriptionWithCursor> x$1)voidunregisterSubscription(SubscriptionWithCursor subscription)called fromSubscription::cancel, i.e.voidunregisterSubscriptionInternal(SubscriptionWithCursor subscription)
-
-
-
Method Detail
-
initialBufferSize
int initialBufferSize()
-
maxBufferSize
int maxBufferSize()
-
requestFromUpstream
void requestFromUpstream(long elements)
called when we are ready to consume more elements from our upstream MUST NOT call pushToDownstream- Parameters:
elements- (undocumented)
-
cancelUpstream
void cancelUpstream()
called beforeshutdown()if the stream is *not* being regularly completed but shut-down due to the last subscriber having canceled its subscription
-
shutdown
void shutdown(boolean completed)
called when the spi.Publisher/Processor is ready to be shut down- Parameters:
completed- (undocumented)
-
createSubscription
SubscriptionWithCursor createSubscription(org.reactivestreams.Subscriber<? super T> subscriber)
Use to register a subscriber- Parameters:
subscriber- (undocumented)- Returns:
- (undocumented)
-
bufferDebug
java.lang.String bufferDebug()
-
subscriptions_$eq
void subscriptions_$eq(scala.collection.immutable.List<SubscriptionWithCursor> x$1)
-
pendingFromUpstream_$eq
void pendingFromUpstream_$eq(long x$1)
-
endOfStream_$eq
void endOfStream_$eq(SubscriberManagement.EndOfStream x$1)
-
cursors
scala.collection.immutable.List<SubscriptionWithCursor> cursors()
- Specified by:
cursorsin interfaceResizableMultiReaderRingBuffer.Cursors
-
moreRequested
void moreRequested(SubscriptionWithCursor subscription, long elements)
more demand was signaled from a given subscriber- Parameters:
subscription- (undocumented)elements- (undocumented)
-
requestFromUpstreamIfRequired
void requestFromUpstreamIfRequired()
-
pushToDownstream
void pushToDownstream(T value)
this method must be called by the implementing class whenever a new value is available to be pushed downstream- Parameters:
value- (undocumented)
-
completeDownstream
void completeDownstream()
this method must be called by the implementing class whenever it has been determined that no more elements will be produced
-
abortDownstream
void abortDownstream(java.lang.Throwable cause)
this method must be called by the implementing class to push an error downstream- Parameters:
cause- (undocumented)
-
registerSubscriber
void registerSubscriber(org.reactivestreams.Subscriber<? super T> subscriber)
Register a new subscriber.- Parameters:
subscriber- (undocumented)
-
addSubscription
void addSubscription(org.reactivestreams.Subscriber<? super T> subscriber)
-
unregisterSubscription
void unregisterSubscription(SubscriptionWithCursor subscription)
called fromSubscription::cancel, i.e. from another thread, override to add synchronization with itself,subscribeandmoreRequested- Parameters:
subscription- (undocumented)
-
unregisterSubscriptionInternal
void unregisterSubscriptionInternal(SubscriptionWithCursor subscription)
-
-