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 class
SubscriberManagement.Completed$
static interface
SubscriberManagement.EndOfStream
static class
SubscriberManagement.ErrorCompleted
static class
SubscriberManagement.ErrorCompleted$
static class
SubscriberManagement.NotReached$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abortDownstream(java.lang.Throwable cause)
this method must be called by the implementing class to push an error downstreamvoid
addSubscription(org.reactivestreams.Subscriber<? super T> subscriber)
java.lang.String
bufferDebug()
void
cancelUpstream()
called beforeshutdown()
if the stream is *not* being regularly completed but shut-down due to the last subscriber having canceled its subscriptionvoid
completeDownstream()
this method must be called by the implementing class whenever it has been determined that no more elements will be producedSubscriptionWithCursor
createSubscription(org.reactivestreams.Subscriber<? super T> subscriber)
Use to register a subscriberscala.collection.immutable.List<SubscriptionWithCursor>
cursors()
void
endOfStream_$eq(SubscriberManagement.EndOfStream x$1)
int
initialBufferSize()
int
maxBufferSize()
void
moreRequested(SubscriptionWithCursor subscription, long elements)
more demand was signaled from a given subscribervoid
pendingFromUpstream_$eq(long x$1)
void
pushToDownstream(T value)
this method must be called by the implementing class whenever a new value is available to be pushed downstreamvoid
registerSubscriber(org.reactivestreams.Subscriber<? super T> subscriber)
Register a new subscriber.void
requestFromUpstream(long elements)
called when we are ready to consume more elements from our upstream MUST NOT call pushToDownstreamvoid
requestFromUpstreamIfRequired()
void
shutdown(boolean completed)
called when the spi.Publisher/Processor is ready to be shut downvoid
subscriptions_$eq(scala.collection.immutable.List<SubscriptionWithCursor> x$1)
void
unregisterSubscription(SubscriptionWithCursor subscription)
called fromSubscription::cancel
, i.e.void
unregisterSubscriptionInternal(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:
cursors
in 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,subscribe
andmoreRequested
- Parameters:
subscription
- (undocumented)
-
unregisterSubscriptionInternal
void unregisterSubscriptionInternal(SubscriptionWithCursor subscription)
-
-