Class StoringSubscriber<T>
java.lang.Object
software.amazon.awssdk.utils.async.StoringSubscriber<T>
- All Implemented Interfaces:
org.reactivestreams.Subscriber<T>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
An event stored for later retrieval by this subscriber.static enum
-
Constructor Summary
ConstructorDescriptionStoringSubscriber
(int maxEvents) Create a subscriber that stores up tomaxElements
events for retrieval. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
onSubscribe
(org.reactivestreams.Subscription subscription) peek()
Check the first event stored in this subscriber.poll()
Remove and return the first event stored in this subscriber.
-
Constructor Details
-
StoringSubscriber
public StoringSubscriber(int maxEvents) Create a subscriber that stores up tomaxElements
events for retrieval.
-
-
Method Details
-
peek
Check the first event stored in this subscriber.This will return empty if no events are currently available (outstanding demand has not yet been filled).
-
poll
Remove and return the first event stored in this subscriber.This will return empty if no events are currently available (outstanding demand has not yet been filled).
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription) - Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<T>
-
onNext
- Specified by:
onNext
in interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<T>
-
onError
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<T>
-