@SuppressWarnings("unchecked") ReplaySubscriber(ReplayBuffer<T> buffer) { this.buffer = buffer; this.management = new AtomicInteger(); this.subscribers = new AtomicReference<InnerSubscription<T>[]>(EMPTY); this.shouldConnect = new AtomicBoolean(); }
@SuppressWarnings("unchecked") MaybeSubject() { once = new AtomicBoolean(); observers = new AtomicReference<MaybeDisposable<T>[]>(EMPTY); }
FlattenIterableSubscriber(Subscriber<? super R> actual, Function<? super T, ? extends Iterable<? extends R>> mapper, int prefetch) { this.downstream = actual; this.mapper = mapper; this.prefetch = prefetch; this.limit = prefetch - (prefetch >> 2); this.error = new AtomicReference<Throwable>(); this.requested = new AtomicLong(); }
LatestAsyncEmitter(Subscriber<? super T> downstream) { super(downstream); this.queue = new AtomicReference<T>(); this.wip = new AtomicInteger(); }
@Override public void cancel() { terminate.set(true); active.decrementAndGet(); } });
@Override void onUnsubscribed() { if (wip.getAndIncrement() == 0) { queue.lazySet(null); } }
@SuppressWarnings("unchecked") PublishSubscriber(AtomicReference<PublishSubscriber<T>> current, int bufferSize) { this.subscribers = new AtomicReference<InnerSubscriber<T>[]>(EMPTY); this.current = current; this.shouldConnect = new AtomicBoolean(); this.bufferSize = bufferSize; }
@SuppressWarnings("unchecked") public SingleCache(SingleSource<? extends T> source) { this.source = source; this.wip = new AtomicInteger(); this.observers = new AtomicReference<CacheDisposable<T>[]>(EMPTY); }
public SubscriptionArbiter(boolean cancelOnReplace) { this.cancelOnReplace = cancelOnReplace; missedSubscription = new AtomicReference<Subscription>(); missedRequested = new AtomicLong(); missedProduced = new AtomicLong(); }
@Override public void run() { terminate.set(true); active.decrementAndGet(); } }));
ReplayObserver(ReplayBuffer<T> buffer) { this.buffer = buffer; this.observers = new AtomicReference<InnerDisposable[]>(EMPTY); this.shouldConnect = new AtomicBoolean(); }
@SuppressWarnings("unchecked") MulticastProcessor(int prefetch, boolean delayError) { this.prefetch = prefetch; this.limit = prefetch - (prefetch >> 2); // request after 75% consumption this.delayError = delayError; this.wip = new AtomicInteger(); this.upstream = new AtomicReference<Subscription>(); this.subscribers = new AtomicReference<MulticastSubscription<T>[]>(EMPTY); }
SubscribeOnSubscriber(Subscriber<? super T> actual, Scheduler.Worker worker, Publisher<T> source, boolean requestOn) { this.downstream = actual; this.worker = worker; this.source = source; this.upstream = new AtomicReference<Subscription>(); this.requested = new AtomicLong(); this.nonScheduledRequests = !requestOn; }
public CompletableCache(CompletableSource source) { this.source = source; this.observers = new AtomicReference<InnerCompletableCache[]>(EMPTY); this.once = new AtomicBoolean(); }
WhenReceiver(Publisher<T> source) { this.source = source; this.upstream = new AtomicReference<Subscription>(); this.requested = new AtomicLong(); }
@SuppressWarnings("unchecked") SingleSubject() { once = new AtomicBoolean(); observers = new AtomicReference<SingleDisposable<T>[]>(EMPTY); }
ThrottleLatestSubscriber(Subscriber<? super T> downstream, long timeout, TimeUnit unit, Scheduler.Worker worker, boolean emitLast) { this.downstream = downstream; this.timeout = timeout; this.unit = unit; this.worker = worker; this.emitLast = emitLast; this.latest = new AtomicReference<T>(); this.requested = new AtomicLong(); }
@SuppressWarnings("unchecked") PublishObserver(AtomicReference<PublishObserver<T>> current) { this.observers = new AtomicReference<InnerDisposable<T>[]>(EMPTY); this.current = current; this.shouldConnect = new AtomicBoolean(); }