Top Inners Fields Constructors Methods
io.reactivex.rxjava3.internal.operators.observable

public final Class ObservableReplay<T>

extends ConnectableObservable<T>
implements HasUpstreamObservableSource<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.internal.fuseable.HasUpstreamObservableSource
Imports
java.util.*, java.util.concurrent.TimeUnit, java.util.concurrent.atomic.*, io.reactivex.rxjava3.core.*, .Observable, .Observer, io.reactivex.rxjava3.disposables.Disposable, io.reactivex.rxjava3.exceptions.Exceptions, io.reactivex.rxjava3.functions.*, io.reactivex.rxjava3.internal.disposables.*, io.reactivex.rxjava3.internal.fuseable.HasUpstreamObservableSource, io.reactivex.rxjava3.internal.util.*, io.reactivex.rxjava3.observables.ConnectableObservable, io.reactivex.rxjava3.plugins.RxJavaPlugins, io.reactivex.rxjava3.schedulers.Timed

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
ObservableReplay.BoundedReplayBuffer<
the value type
T
>

Base class for bounded buffering with options to specify an enter and leave transforms and custom truncation behavior.

pack-priv static interface
pack-priv static class
pack-priv static class
ObservableReplay.InnerDisposable<
the value type
T
>

A Disposable that manages the disposed state of a child Observer in thread-safe manner.

pack-priv static class
pack-priv static class
ObservableReplay.Node

Represents a node in a bounded replay buffer's linked list.

pack-priv static interface
ObservableReplay.ReplayBuffer<
the value type
T
>

The interface for interacting with various buffering logic.

pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
ObservableReplay.SizeAndTimeBoundReplayBuffer<
the buffered value type
T
>

Size and time bound replay buffer.

pack-priv static class
ObservableReplay.SizeBoundReplayBuffer<
the value type
T
>

A bounded replay buffer implementation with size limit only.

pack-priv static class
pack-priv static class
ObservableReplay.UnboundedReplayBuffer<
the value type
T
>

Holds an unbounded list of events.

Field Summary

Modifier and TypeField and Description
pack-priv final ObservableReplay.BufferSupplier<T>
bufferFactory

A factory that creates the appropriate buffer for the ReplayObserver.

pack-priv final AtomicReference<ObservableReplay.ReplayObserver<T>>
current

Holds the current subscriber that is, will be or just was subscribed to the source observable.

pack-priv static final ObservableReplay.BufferSupplier<T>
pack-priv final ObservableSource<T>
pack-priv final ObservableSource<T>
source

The source observable.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
connect(Consumer<? super Disposable> connection)

public static <
the value type
T
>
ConnectableObservable<T>

Returns:

the new ConnectableObservable instance
create
(ObservableSource<T>
the source ObservableSource to use
source
,
final int
the maximum number of elements to hold
bufferSize
,
boolean
if true, the head reference is refreshed to avoid unwanted item retention
eagerTruncate
)

Creates a replaying ConnectableObservable with a size bound buffer.

public static <
the value type
T
>
ConnectableObservable<T>

Returns:

the new ConnectableObservable instance
create
(ObservableSource<T>
the source ObservableSource to use
source
,
long
the maximum age of entries
maxAge
,
TimeUnit
the unit of measure of the age amount
unit
,
Scheduler
the target scheduler providing the current time
scheduler
,
boolean
if true, the head reference is refreshed to avoid unwanted item retention
eagerTruncate
)

Creates a replaying ConnectableObservable with a time bound buffer.

public static <
the value type
T
>
ConnectableObservable<T>

Returns:

the new ConnectableObservable instance
create
(ObservableSource<T>
the source ObservableSource to use
source
,
final long
the maximum age of entries
maxAge
,
final TimeUnit
the unit of measure of the age amount
unit
,
final Scheduler
the target scheduler providing the current time
scheduler
,
final int
the maximum number of elements to hold
bufferSize
,
boolean
if true, the head reference is refreshed to avoid unwanted item retention
eagerTruncate
)

Creates a replaying ConnectableObservable with a size and time bound buffer.

pack-priv static <
the value type
T
>
ConnectableObservable<T>

Returns:

the connectable observable
create
(ObservableSource<T>
the source observable
source
,
final ObservableReplay.BufferSupplier<T>
the factory to instantiate the appropriate buffer when the observable becomes active
bufferFactory
)

Creates a OperatorReplay instance to replay values of the given source observable.

public static <
the value type
T
>
ConnectableObservable<T>

Returns:

the new ConnectableObservable instance
createFrom
(ObservableSource<? extends T>
the source observable
source
)

Creates a replaying ConnectableObservable with an unbounded buffer.

public static <
the value type of the ConnectableObservable
U
,
the result value type
R
>
Observable<R>

Returns:

the new Observable instance
multicastSelector
(final Supplier<? extends ConnectableObservable<U>>
the factory that returns a ConnectableObservable for each individual subscriber
connectableFactory
,
final Function<? super Observable<U>, ? extends ObservableSource<R>>
the function that receives an Observable and should return another Observable that will be subscribed to
selector
)

Given a connectable observable factory, it multicasts over the generated ConnectableObservable via a selector function.

public void
reset()

Implements abstract io.reactivex.rxjava3.observables.ConnectableObservable.reset.

Resets this ConnectableObservable into its fresh state if it has terminated or has been disposed.
public ObservableSource<T>
source()

Implements io.reactivex.rxjava3.internal.fuseable.HasUpstreamObservableSource.source.

Returns the upstream source of this Observable.
protected void
subscribeActual(Observer<? super T> observer)

Inherited from io.reactivex.rxjava3.observables.ConnectableObservable:
autoConnectautoConnectautoConnectconnectconnectrefCountrefCountrefCountrefCountrefCountrefCount