public class RxRingBuffer extends Object implements Subscription
Modifier and Type | Field and Description |
---|---|
static int |
SIZE |
Object |
terminalState
We store the terminal state separately so it doesn't count against the size.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Object o,
Observer child) |
Throwable |
asError(Object o) |
int |
available() |
int |
capacity() |
int |
count() |
static RxRingBuffer |
getSpmcInstance() |
static RxRingBuffer |
getSpscInstance() |
Object |
getValue(Object o) |
boolean |
isCompleted(Object o) |
boolean |
isEmpty() |
boolean |
isError(Object o) |
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
void |
onCompleted() |
void |
onError(Throwable t) |
void |
onNext(Object o) |
Object |
peek() |
Object |
poll() |
void |
release() |
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
public volatile Object terminalState
public static final int SIZE
public static RxRingBuffer getSpscInstance()
public static RxRingBuffer getSpmcInstance()
public void release()
public void unsubscribe()
Subscription
Subscriber
that was registered when this Subscription
was received.
This allows deregistering an Subscriber
before it has finished receiving all events (i.e. before
onCompleted is called).
unsubscribe
in interface Subscription
public void onNext(Object o) throws MissingBackpressureException
o
- the value to bufferMissingBackpressureException
- if more onNext are sent than have been requestedpublic void onCompleted()
public void onError(Throwable t)
public int available()
public int capacity()
public int count()
public boolean isEmpty()
public Object poll()
public Object peek()
public boolean isCompleted(Object o)
public boolean isError(Object o)
public boolean isUnsubscribed()
Subscription
Subscription
is currently unsubscribed.isUnsubscribed
in interface Subscription
true
if this Subscription
is currently unsubscribed, false
otherwiseCopyright © 2018. All rights reserved.