Class ObservableAmb.AmbCoordinator<T>
- java.lang.Object
-
- io.reactivex.rxjava3.internal.operators.observable.ObservableAmb.AmbCoordinator<T>
-
- All Implemented Interfaces:
Disposable
- Enclosing class:
- ObservableAmb<T>
static final class ObservableAmb.AmbCoordinator<T> extends java.lang.Object implements Disposable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Observer<? super T>
downstream
(package private) ObservableAmb.AmbInnerObserver<T>[]
observers
(package private) java.util.concurrent.atomic.AtomicInteger
winner
-
Constructor Summary
Constructors Constructor Description AmbCoordinator(Observer<? super T> actual, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose the resource, the operation should be idempotent.boolean
isDisposed()
Returns true if this resource has been disposed.void
subscribe(ObservableSource<? extends T>[] sources)
boolean
win(int index)
-
-
-
Field Detail
-
observers
final ObservableAmb.AmbInnerObserver<T>[] observers
-
winner
final java.util.concurrent.atomic.AtomicInteger winner
-
-
Method Detail
-
subscribe
public void subscribe(ObservableSource<? extends T>[] sources)
-
win
public boolean win(int index)
-
dispose
public void dispose()
Description copied from interface:Disposable
Dispose the resource, the operation should be idempotent.- Specified by:
dispose
in interfaceDisposable
-
isDisposed
public boolean isDisposed()
Description copied from interface:Disposable
Returns true if this resource has been disposed.- Specified by:
isDisposed
in interfaceDisposable
- Returns:
- true if this resource has been disposed
-
-