Top Fields Constructors Methods
rx.internal.util.unsafe

public final Class SpmcArrayQueue<E>

Additional top-level classes in compilation unit: SpmcArrayQueueL1Pad, SpmcArrayQueueProducerField, SpmcArrayQueueL2Pad, SpmcArrayQueueConsumerField, SpmcArrayQueueMidPad, SpmcArrayQueueProducerIndexCacheField, SpmcArrayQueueL3Pad.

extends SpmcArrayQueueL3Pad<E>
Class Inheritance
Annotations
@SuppressAnimalSniffer
Static Imports
rx.internal.util.unsafe.UnsafeAccess.UNSAFE

Field Summary

Inherited from rx.internal.util.unsafe.SpmcArrayQueueL3Pad:
p30p31p32p33p34p35p36p37p40p41p42p43p44p45p46

Constructor Summary

AccessConstructor and Description
public
SpmcArrayQueue(final int capacity)

Method Summary

Modifier and TypeMethod and Description
public boolean
isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements rx.internal.util.unsafe.MessagePassingQueue.isEmpty, java.util.Collection.isEmpty.

This method's accuracy is subject to concurrent modifications happening as the observation is carried out.
public boolean
offer(final E
the Object to enqueue, not null
e
)

Implements rx.internal.util.unsafe.MessagePassingQueue.offer, java.util.Queue.offer.

Called from a producer thread subject to the restrictions appropriate to the implementation and according to the Queue#offer(Object) interface.
public E
peek()

Implements rx.internal.util.unsafe.MessagePassingQueue.peek, java.util.Queue.peek.

Called from the consumer thread subject to the restrictions appropriate to the implementation and according to the Queue#peek() interface.
public E
poll()

Implements rx.internal.util.unsafe.MessagePassingQueue.poll, java.util.Queue.poll.

Called from the consumer thread subject to the restrictions appropriate to the implementation and according to the Queue#poll() interface.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements rx.internal.util.unsafe.MessagePassingQueue.size, java.util.Collection.size.

This method's accuracy is subject to concurrent modifications happening as the size is estimated and as such is a best effort rather than absolute value.

Constructor Detail

SpmcArrayQueueback to summary
public SpmcArrayQueue(final int capacity)

Method Detail

isEmptyback to summary
public boolean isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements rx.internal.util.unsafe.MessagePassingQueue.isEmpty, java.util.Collection.isEmpty.

Doc from rx.internal.util.unsafe.MessagePassingQueue.isEmpty.

This method's accuracy is subject to concurrent modifications happening as the observation is carried out.

Returns:boolean

true if empty, false otherwise

Annotations
@Override
offerback to summary
public boolean offer(final E e)

Implements rx.internal.util.unsafe.MessagePassingQueue.offer, java.util.Queue.offer.

Doc from rx.internal.util.unsafe.MessagePassingQueue.offer.

Called from a producer thread subject to the restrictions appropriate to the implementation and according to the Queue#offer(Object) interface.

Parameters
e:E

the Object to enqueue, not null

Returns:boolean

true if element was inserted into the queue, false iff full

Annotations
@Override
peekback to summary
public E peek()

Implements rx.internal.util.unsafe.MessagePassingQueue.peek, java.util.Queue.peek.

Doc from rx.internal.util.unsafe.MessagePassingQueue.peek.

Called from the consumer thread subject to the restrictions appropriate to the implementation and according to the Queue#peek() interface.

Returns:E

a message from the queue if one is available, null iff empty

Annotations
@Override
pollback to summary
public E poll()

Implements rx.internal.util.unsafe.MessagePassingQueue.poll, java.util.Queue.poll.

Doc from rx.internal.util.unsafe.MessagePassingQueue.poll.

Called from the consumer thread subject to the restrictions appropriate to the implementation and according to the Queue#poll() interface.

Returns:E

a message from the queue if one is available, null iff empty

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements rx.internal.util.unsafe.MessagePassingQueue.size, java.util.Collection.size.

Doc from rx.internal.util.unsafe.MessagePassingQueue.size.

This method's accuracy is subject to concurrent modifications happening as the size is estimated and as such is a best effort rather than absolute value. For some implementations this method may be O(n) rather than O(1).

Returns:int

number of messages in the queue, between 0 and queue capacity or Integer#MAX_VALUE if not bounded

Annotations
@Override