-
- All Implemented Interfaces:
-
com.tds.common.reactor.Subscription
public class RxRingBuffer implements Subscription
This assumes Spsc or Spmc usage. This means only a single producer calling the on* methods. This is the Rx contract of an Observer (see http://reactivex.io/documentation/contract.html). Concurrent invocations of on* methods will not be thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description public volatile Object
terminalState
public final static int
SIZE
-
Method Summary
Modifier and Type Method Description static RxRingBuffer
getSpscInstance()
static RxRingBuffer
getSpmcInstance()
synchronized void
release()
void
unsubscribe()
Stops the receipt of notifications on the Subscriber that was registered when this Subscriptionwas received. void
onNext(Object o)
void
onCompleted()
void
onError(Throwable t)
int
available()
int
capacity()
int
count()
boolean
isEmpty()
Object
poll()
Object
peek()
boolean
isCompleted(Object o)
boolean
isError(Object o)
Object
getValue(Object o)
boolean
accept(Object o, Observer child)
Throwable
asError(Object o)
boolean
isUnsubscribed()
Indicates whether this {@code Subscription}
is currently unsubscribed.-
-
Method Detail
-
getSpscInstance
static RxRingBuffer getSpscInstance()
-
getSpmcInstance
static RxRingBuffer getSpmcInstance()
-
release
synchronized void release()
-
unsubscribe
void unsubscribe()
Stops the receipt of notifications on the Subscriber that was registered when this Subscriptionwas received.
This allows deregistering an Subscriber before it has finished receiving all events (i.e. beforeonCompleted is called).
-
onCompleted
void onCompleted()
-
available
int available()
-
capacity
int capacity()
-
count
int count()
-
isEmpty
boolean isEmpty()
-
isCompleted
boolean isCompleted(Object o)
-
isUnsubscribed
boolean isUnsubscribed()
Indicates whether this
{@code Subscription}
is currently unsubscribed.
-
-
-
-