public class KxPublisherActor<IN,OUT> extends org.nustaq.kontraktor.Actor<KxPublisherActor<IN,OUT>> implements org.reactivestreams.Processor<IN,OUT>, KxPublisher<OUT>, org.nustaq.kontraktor.remoting.base.RemotedActor
| Modifier and Type | Class and Description |
|---|---|
protected static class |
KxPublisherActor.KSubscription |
protected static class |
KxPublisherActor.SubscriberEntry |
| Modifier and Type | Field and Description |
|---|---|
ArrayList<org.reactivestreams.Subscriber> |
_callerSideSubscribers |
KxReactiveStreams |
_streams |
protected Object |
actorServer |
protected long |
batchSize |
protected boolean |
closeOnComplete |
static boolean |
CRED_DEBUG |
protected ArrayList<Runnable> |
doOnSubscribe |
protected boolean |
isIteratorBased |
protected boolean |
lossy |
protected long |
openRequested |
protected ArrayDeque |
pending |
protected Function<IN,OUT> |
processor |
protected org.reactivestreams.Subscription |
producer |
protected long |
requestNextTrigger |
protected Map<Integer,KxPublisherActor.SubscriberEntry> |
subscribers |
protected int |
subsIdCount |
| Constructor and Description |
|---|
KxPublisherActor() |
| Modifier and Type | Method and Description |
|---|---|
void |
_cancel(int id) |
void |
_onError(Throwable throwable) |
void |
_onNext(IN in) |
void |
_onSubscribe(org.reactivestreams.Subscription subscription) |
void |
_rq(long l,
int id) |
org.nustaq.kontraktor.IPromise<KxPublisherActor.KSubscription> |
_subscribe(org.nustaq.kontraktor.Callback subscriber) |
protected long |
calcMinCredits() |
protected void |
emitRequestNext() |
protected void |
forwardError(Throwable err) |
protected void |
forwardMessage(Object msg) |
protected List |
forwardPending(long minCredits,
List toRemove) |
KxReactiveStreams |
getKxStreamsInstance() |
protected KxPublisherActor.SubscriberEntry |
getSE(Integer i) |
void |
hasBeenUnpublished() |
void |
init(Function<IN,OUT> processor) |
void |
initFromIterator(Iterator<IN> iterator)
acts as an pull based event producer then
|
void |
onComplete() |
void |
onError(Throwable throwable) |
void |
onNext(IN in) |
void |
onSubscribe(org.reactivestreams.Subscription subscription) |
protected void |
removeSubscribers(List toRemove) |
void |
setBatchSize(int batchSize) |
void |
setCloseOnComplete(boolean closeOnComplete) |
void |
setLossy(boolean lossy) |
void |
stop() |
void |
subscribe(org.reactivestreams.Subscriber<? super OUT> subscriber) |
void |
subscriberDisconnected(int id) |
__addDeadLetter, __addRemoteConnection, __addStopHandler, __dispatchRemoteCall, __enqueueCall, __getCachedMethod, __removeRemoteConnection, __stop, __stopImpl, __submit, ask, askMsg, asyncstop, checkThread, close, closeCurrentClient, current, delayed, exec, execute, getActor, getActorRef, getCallbackSize, getConnections, getCurrentDispatcher, getFactory, getMailboxSize, getQSizes, getReport, getScheduler, getSubMonitorables, getThrowExWhenBlocked, hasStopped, inside, inThread, isCallbackQPressured, isEmpty, isMailboxPressured, isProxy, isPublished, isRemote, isStopped, ping, self, serialOn, setThrowExWhenBlocked, stopSafeClose, tell, tellMsg, transferToAddDeadLetter, all, all, all, allMapped, AsActor, AsActor, AsActor, AsActor, AsBufferedActor, AsUntypedActor, awaitAll, awaitAll, awaitAll, awaitAll, complete, complete, DeadLetters, InThread, isComplete, isCont, isError, isErrorOrComplete, isResult, isTimeout, promise, race, race, reject, resolve, resolve, stream, SubmitDelayed, yield, yield, yieldCallbackspublic static final boolean CRED_DEBUG
protected Map<Integer,KxPublisherActor.SubscriberEntry> subscribers
protected int subsIdCount
protected ArrayDeque pending
protected boolean isIteratorBased
protected boolean closeOnComplete
protected Object actorServer
protected boolean lossy
public KxReactiveStreams _streams
public ArrayList<org.reactivestreams.Subscriber> _callerSideSubscribers
protected org.reactivestreams.Subscription producer
protected long batchSize
protected long requestNextTrigger
protected long openRequested
public void initFromIterator(Iterator<IN> iterator)
iterator - public void subscribe(org.reactivestreams.Subscriber<? super OUT> subscriber)
subscribe in interface org.reactivestreams.Publisher<OUT>public org.nustaq.kontraktor.IPromise<KxPublisherActor.KSubscription> _subscribe(org.nustaq.kontraktor.Callback subscriber)
public void _cancel(int id)
public void _rq(long l,
int id)
protected KxPublisherActor.SubscriberEntry getSE(Integer i)
public void setBatchSize(int batchSize)
public void onSubscribe(org.reactivestreams.Subscription subscription)
onSubscribe in interface org.reactivestreams.Subscriber<IN>public void _onSubscribe(org.reactivestreams.Subscription subscription)
protected void emitRequestNext()
public void onNext(IN in)
onNext in interface org.reactivestreams.Subscriber<IN>public void _onNext(IN in)
protected void forwardError(Throwable err)
protected void forwardMessage(Object msg)
protected long calcMinCredits()
protected void removeSubscribers(List toRemove)
public void onError(Throwable throwable)
onError in interface org.reactivestreams.Subscriber<IN>public void _onError(Throwable throwable)
public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<IN>public void hasBeenUnpublished()
hasBeenUnpublished in interface org.nustaq.kontraktor.remoting.base.RemotedActorpublic void stop()
stop in class org.nustaq.kontraktor.Actor<KxPublisherActor<IN,OUT>>public void subscriberDisconnected(int id)
public void setCloseOnComplete(boolean closeOnComplete)
public void setLossy(boolean lossy)
public KxReactiveStreams getKxStreamsInstance()
getKxStreamsInstance in interface KxPublisher<OUT>Copyright © 2017. All rights reserved.