Toggle navigation
Home
io.reactivex.Flowable to io.reactivex.Single
No. of Instances - 333
No. of Commits - 1
No. of Projects - {'redisson'}
Hierarchy/Composition: SIBLING
Primitive Info: -
NameSpace: External -> External
Mapping:
Update Anonymous class
{ @Override public void accept( long t) throws Exception { final AtomicBoolean completed=new AtomicBoolean(); final AtomicLong values=new AtomicLong(); final AtomicBoolean lastSize=new AtomicBoolean(); cc.subscribe(new Consumer<V>(){ @Override public void accept( V t) throws Exception { values.getAndIncrement(); add(t).onComplete((res,e) -> { if (e != null) { p.onError(e); return; } if (res) { lastSize.set(true); } if (values.decrementAndGet() == 0 && completed.get()) { p.onNext(lastSize.get()); p.onComplete(); } } ); } } ,new Consumer<Throwable>(){ @Override public void accept( Throwable t) throws Exception { p.onError(t); } } ,new Action(){ @Override public void run() throws Exception { completed.set(true); if (values.get() == 0) { p.onNext(lastSize.get()); p.onComplete(); } } } ,FlowableInternalHelper.RequestMax.INSTANCE); } }
to
{ @Override public void accept( long t) throws Exception { final AtomicBoolean completed=new AtomicBoolean(); final AtomicLong values=new AtomicLong(); final AtomicBoolean lastSize=new AtomicBoolean(); cc.subscribe(new Consumer<V>(){ @Override public void accept( V t) throws Exception { values.getAndIncrement(); add(t).onComplete((res,e) -> { if (e != null) { p.onError(e); return; } if (res) { lastSize.set(true); } if (values.decrementAndGet() == 0 && completed.get()) { p.onNext(lastSize.get()); p.onComplete(); } } ); } } ,new Consumer<Throwable>(){ @Override public void accept( Throwable t) throws Exception { p.onError(t); } } ,new Action(){ @Override public void run() throws Exception { completed.set(true); if (values.get() == 0) { p.onNext(lastSize.get()); p.onComplete(); } } } ,FlowableInternalHelper.RequestMax.INSTANCE); } }