Class StoringSubscriber<T>
java.lang.Object
software.amazon.awssdk.utils.async.StoringSubscriber<T>
- All Implemented Interfaces:
org.reactivestreams.Subscriber<T>
@SdkProtectedApi
public class StoringSubscriber<T>
extends Object
implements org.reactivestreams.Subscriber<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn event stored for later retrieval by this subscriber.static enum -
Constructor Summary
ConstructorsConstructorDescriptionStoringSubscriber(int maxEvents) Create a subscriber that stores up tomaxElementsevents for retrieval. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidonSubscribe(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 tomaxElementsevents 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:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onNext
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>
-
onError
-