Package rx.internal.operators
Class OperatorOnBackpressureBuffer<T>
- java.lang.Object
-
- rx.internal.operators.OperatorOnBackpressureBuffer<T>
-
- All Implemented Interfaces:
Func1<Subscriber<? super T>,Subscriber<? super T>>
,Function
,Observable.Operator<T,T>
public class OperatorOnBackpressureBuffer<T> extends java.lang.Object implements Observable.Operator<T,T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
OperatorOnBackpressureBuffer.BufferSubscriber<T>
(package private) static class
OperatorOnBackpressureBuffer.Holder
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Long
capacity
private Action0
onOverflow
private BackpressureOverflow.Strategy
overflowStrategy
-
Constructor Summary
Constructors Constructor Description OperatorOnBackpressureBuffer()
OperatorOnBackpressureBuffer(long capacity)
Construct a new instance that will handle overflows withON_OVERFLOW_DEFAULT
, providing the following behavior config:OperatorOnBackpressureBuffer(long capacity, Action0 onOverflow)
Construct a new instance that will handle overflows withON_OVERFLOW_DEFAULT
, providing the following behavior config:OperatorOnBackpressureBuffer(long capacity, Action0 onOverflow, BackpressureOverflow.Strategy overflowStrategy)
Construct a new instance feeding the following behavior config:
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscriber<? super T>
call(Subscriber<? super T> child)
static <T> OperatorOnBackpressureBuffer<T>
instance()
-
-
-
Field Detail
-
capacity
private final java.lang.Long capacity
-
onOverflow
private final Action0 onOverflow
-
overflowStrategy
private final BackpressureOverflow.Strategy overflowStrategy
-
-
Constructor Detail
-
OperatorOnBackpressureBuffer
OperatorOnBackpressureBuffer()
-
OperatorOnBackpressureBuffer
public OperatorOnBackpressureBuffer(long capacity)
Construct a new instance that will handle overflows withON_OVERFLOW_DEFAULT
, providing the following behavior config:- Parameters:
capacity
- the max number of items to be admitted in the buffer, must be greater than 0.
-
OperatorOnBackpressureBuffer
public OperatorOnBackpressureBuffer(long capacity, Action0 onOverflow)
Construct a new instance that will handle overflows withON_OVERFLOW_DEFAULT
, providing the following behavior config:- Parameters:
capacity
- the max number of items to be admitted in the buffer, must be greater than 0.onOverflow
- theAction0
to execute when the buffer overflows, may be null.
-
OperatorOnBackpressureBuffer
public OperatorOnBackpressureBuffer(long capacity, Action0 onOverflow, BackpressureOverflow.Strategy overflowStrategy)
Construct a new instance feeding the following behavior config:- Parameters:
capacity
- the max number of items to be admitted in the buffer, must be greater than 0.onOverflow
- theAction0
to execute when the buffer overflows, may be null.overflowStrategy
- theBackpressureOverflow.Strategy
to handle overflows, it must not be null.
-
-
Method Detail
-
instance
public static <T> OperatorOnBackpressureBuffer<T> instance()
-
call
public Subscriber<? super T> call(Subscriber<? super T> child)
- Specified by:
call
in interfaceFunc1<Subscriber<? super T>,Subscriber<? super T>>
-
-