T - public class KxSubscriber<T> extends Object implements org.reactivestreams.Subscriber<T>, Serializable, Iterator<T>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoRequestOnSubs |
protected long |
batchSize |
protected ConcurrentLinkedQueue |
buffer |
protected org.nustaq.kontraktor.Callback<T> |
cb |
static String |
COMPLETE |
protected long |
credits |
static org.nustaq.kontraktor.impl.BackOffStrategy |
strat |
protected org.reactivestreams.Subscription |
subs |
static ThreadLocal<org.reactivestreams.Subscription> |
subsToCancel |
| Constructor and Description |
|---|
KxSubscriber(long batchSize)
iterator mode constructor, spawns a thread
|
KxSubscriber(long batchSize,
org.nustaq.kontraktor.Callback<T> cb) |
KxSubscriber(long batchSize,
org.nustaq.kontraktor.Callback<T> cb,
boolean autoRequestOnSubs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
T |
next() |
protected void |
nextAction(T t) |
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removepublic static final String COMPLETE
public static org.nustaq.kontraktor.impl.BackOffStrategy strat
protected long batchSize
protected org.nustaq.kontraktor.Callback<T> cb
protected long credits
protected org.reactivestreams.Subscription subs
protected boolean autoRequestOnSubs
protected ConcurrentLinkedQueue buffer
public static ThreadLocal<org.reactivestreams.Subscription> subsToCancel
public KxSubscriber(long batchSize)
batchSize - public KxSubscriber(long batchSize,
org.nustaq.kontraktor.Callback<T> cb)
public KxSubscriber(long batchSize,
org.nustaq.kontraktor.Callback<T> cb,
boolean autoRequestOnSubs)
public void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<T>protected void nextAction(T t)
public void onError(Throwable t)
onError in interface org.reactivestreams.Subscriber<T>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<T>Copyright © 2015. All rights reserved.