Top Description Inners Fields Constructors Methods
io.reactivex.rxjava3.internal.operators.completable

public final Class CompletableCache

extends Completable
implements CompletableObserver
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.core.CompletableObserver
Imports
java.util.concurrent.atomic.*, io.reactivex.rxjava3.core.*, io.reactivex.rxjava3.disposables.Disposable

Consume the upstream source exactly once and cache its terminal event.

History: 2.0.4 - experimental

Since
2.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv static final CompletableCache.InnerCompletableCache[]
pack-priv Throwable
pack-priv final AtomicReference<CompletableCache.InnerCompletableCache[]>
pack-priv final AtomicBoolean
pack-priv final CompletableSource
pack-priv static final CompletableCache.InnerCompletableCache[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
public void
onComplete()

Implements io.reactivex.rxjava3.core.CompletableObserver.onComplete.

Called once the deferred computation completes normally.
public void
public void
pack-priv void
protected void
Inherited from io.reactivex.rxjava3.core.Completable:
ambambArrayambWithandThenandThenandThenandThenandThenblockingAwaitblockingAwaitblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribecachecompletecomposeconcatconcatconcatconcatArrayconcatArrayDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatWithcreatedeferdelaydelaydelaydelaySubscriptiondelaySubscriptiondoAfterTerminatedoFinallydoOnCompletedoOnDisposedoOnErrordoOnEventdoOnLifecycledoOnSubscribedoOnTerminateerrorerrorfromActionfromCallablefromCompletionStagefromFuturefromMaybefromObservablefromPublisherfromRunnablefromSinglefromSupplierhideliftmaterializemergemergemergemergeArraymergeArrayDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithneverobserveOnonErrorCompleteonErrorCompleteonErrorResumeNextonErrorResumeWithonErrorReturnonErrorReturnItemonTerminateDetachrepeatrepeatrepeatUntilrepeatWhenretryretryretryretryretryretryUntilretryWhensafeSubscribesequenceEqualstartWithstartWithstartWithstartWithstartWithsubscribesubscribesubscribesubscribesubscribesubscribeActualsubscribeOnsubscribeWithswitchOnNextswitchOnNextDelayErrortakeUntiltesttesttimeouttimeouttimeouttimeouttimertimertotoCompletionStagetoFlowabletoFuturetoMaybetoObservabletoSingletoSingleDefaultunsafeCreateunsubscribeOnusingusingwrap

Field Detail

EMPTYback to summary
pack-priv static final CompletableCache.InnerCompletableCache[] EMPTY
errorback to summary
pack-priv Throwable error
observersback to summary
pack-priv final AtomicReference<CompletableCache.InnerCompletableCache[]> observers
onceback to summary
pack-priv final AtomicBoolean once
sourceback to summary
pack-priv final CompletableSource source
TERMINATEDback to summary
pack-priv static final CompletableCache.InnerCompletableCache[] TERMINATED

Constructor Detail

CompletableCacheback to summary
public CompletableCache(CompletableSource source)

Method Detail

addback to summary
pack-priv boolean add(CompletableCache.InnerCompletableCache inner)
onCompleteback to summary
public void onComplete()

Implements io.reactivex.rxjava3.core.CompletableObserver.onComplete.

Doc from io.reactivex.rxjava3.core.CompletableObserver.onComplete.

Called once the deferred computation completes normally.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)
Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Disposable d)
Annotations
@Override
removeback to summary
pack-priv void remove(CompletableCache.InnerCompletableCache inner)
subscribeActualback to summary
protected void subscribeActual(CompletableObserver observer)
Annotations
@Override
io.reactivex.rxjava3.internal.operators.completable back to summary

pack-priv final Class CompletableCache.InnerCompletableCache

extends AtomicBoolean
implements Disposable
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.disposables.Disposable

Field Summary

Modifier and TypeField and Description
pack-priv final CompletableObserver
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public boolean
isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
Inherited from java.util.concurrent.atomic.AtomicBoolean:
compareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndSetgetOpaquegetPlainlazySetsetsetOpaquesetPlainsetReleasetoStringweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

downstreamback to summary
pack-priv final CompletableObserver downstream
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicBoolean.serialVersionUID.

Constructor Detail

InnerCompletableCacheback to summary
pack-priv InnerCompletableCache(CompletableObserver downstream)

Method Detail

disposeback to summary
public void dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Doc from io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Doc from io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

Annotations
@Override