Class CompletableDoFinally.DoFinallyObserver
- java.lang.Object
-
- java.lang.Number
-
- java.util.concurrent.atomic.AtomicInteger
-
- io.reactivex.rxjava3.internal.operators.completable.CompletableDoFinally.DoFinallyObserver
-
- All Implemented Interfaces:
CompletableObserver,Disposable,java.io.Serializable
- Enclosing class:
- CompletableDoFinally
static final class CompletableDoFinally.DoFinallyObserver extends java.util.concurrent.atomic.AtomicInteger implements CompletableObserver, Disposable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CompletableObserverdownstream(package private) ActiononFinallyprivate static longserialVersionUID(package private) Disposableupstream
-
Constructor Summary
Constructors Constructor Description DoFinallyObserver(CompletableObserver actual, Action onFinally)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose the resource, the operation should be idempotent.booleanisDisposed()Returns true if this resource has been disposed.voidonComplete()Called once the deferred computation completes normally.voidonError(java.lang.Throwable t)Called once if the deferred computation 'throws' an exception.voidonSubscribe(Disposable d)Called once by theCompletableto set aDisposableon this instance which then can be used to cancel the subscription at any time.(package private) voidrunFinally()-
Methods inherited from class java.util.concurrent.atomic.AtomicInteger
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
downstream
final CompletableObserver downstream
-
onFinally
final Action onFinally
-
upstream
Disposable upstream
-
-
Constructor Detail
-
DoFinallyObserver
DoFinallyObserver(CompletableObserver actual, Action onFinally)
-
-
Method Detail
-
onSubscribe
public void onSubscribe(Disposable d)
Description copied from interface:CompletableObserverCalled once by theCompletableto set aDisposableon this instance which then can be used to cancel the subscription at any time.- Specified by:
onSubscribein interfaceCompletableObserver- Parameters:
d- theDisposableinstance to call dispose on for cancellation, not null
-
onError
public void onError(java.lang.Throwable t)
Description copied from interface:CompletableObserverCalled once if the deferred computation 'throws' an exception.- Specified by:
onErrorin interfaceCompletableObserver- Parameters:
t- the exception, notnull.
-
onComplete
public void onComplete()
Description copied from interface:CompletableObserverCalled once the deferred computation completes normally.- Specified by:
onCompletein interfaceCompletableObserver
-
dispose
public void dispose()
Description copied from interface:DisposableDispose the resource, the operation should be idempotent.- Specified by:
disposein interfaceDisposable
-
isDisposed
public boolean isDisposed()
Description copied from interface:DisposableReturns true if this resource has been disposed.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if this resource has been disposed
-
runFinally
void runFinally()
-
-