Class BasicQueueSubscription<T>
- java.lang.Object
-
- java.lang.Number
-
- java.util.concurrent.atomic.AtomicLong
-
- io.reactivex.rxjava3.internal.subscriptions.BasicQueueSubscription<T>
-
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
QueueFuseable<T>
,QueueSubscription<T>
,SimpleQueue<T>
,java.io.Serializable
,org.reactivestreams.Subscription
- Direct Known Subclasses:
FlowableFromArray.BaseArraySubscription
,FlowableFromIterable.BaseRangeSubscription
,FlowableRange.BaseRangeSubscription
,FlowableRangeLong.BaseRangeSubscription
public abstract class BasicQueueSubscription<T> extends java.util.concurrent.atomic.AtomicLong implements QueueSubscription<T>
Base class extending AtomicLong (wip or request accounting) and QueueSubscription (fusion).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description BasicQueueSubscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
offer(T e)
Atomically enqueue a single value.boolean
offer(T v1, T v2)
Atomically enqueue two values.-
Methods inherited from class java.util.concurrent.atomic.AtomicLong
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.reactivex.rxjava3.operators.QueueFuseable
requestFusion
-
Methods inherited from interface io.reactivex.rxjava3.operators.SimpleQueue
clear, isEmpty, poll
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
offer
public final boolean offer(T e)
Description copied from interface:SimpleQueue
Atomically enqueue a single value.- Specified by:
offer
in interfaceSimpleQueue<T>
- Parameters:
e
- the value to enqueue, not null- Returns:
- true if successful, false if the value was not enqueued likely due to reaching the queue capacity)
-
offer
public final boolean offer(T v1, T v2)
Description copied from interface:SimpleQueue
Atomically enqueue two values.- Specified by:
offer
in interfaceSimpleQueue<T>
- Parameters:
v1
- the first value to enqueue, not nullv2
- the second value to enqueue, not null- Returns:
- true if successful, false if the value was not enqueued likely due to reaching the queue capacity)
-
-