Package com.github.benmanes.caffeine
Class SCQHeader.HeadAndTailRef<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- com.github.benmanes.caffeine.SCQHeader.PadHead<E>
-
- com.github.benmanes.caffeine.SCQHeader.HeadRef<E>
-
- com.github.benmanes.caffeine.SCQHeader.PadHeadAndTail<E>
-
- com.github.benmanes.caffeine.SCQHeader.HeadAndTailRef<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.Queue<E>
- Direct Known Subclasses:
SingleConsumerQueue
- Enclosing class:
- SCQHeader
abstract static class SCQHeader.HeadAndTailRef<E> extends SCQHeader.PadHeadAndTail<E>
Enforces a memory layout to avoid false sharing by padding the tail node.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) SingleConsumerQueue.Node<E>
tail
(package private) static long
TAIL_OFFSET
-
Fields inherited from class com.github.benmanes.caffeine.SCQHeader.PadHeadAndTail
p20, p21, p22, p23, p24, p25, p26, p27, p30, p31, p32, p33, p34, p35, p36
-
Fields inherited from class com.github.benmanes.caffeine.SCQHeader.HeadRef
head
-
-
Constructor Summary
Constructors Constructor Description HeadAndTailRef()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
casTail(SingleConsumerQueue.Node<E> expect, SingleConsumerQueue.Node<E> update)
(package private) void
lazySetTail(SingleConsumerQueue.Node<E> next)
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
TAIL_OFFSET
static final long TAIL_OFFSET
-
tail
volatile SingleConsumerQueue.Node<E> tail
-
-
Method Detail
-
lazySetTail
void lazySetTail(SingleConsumerQueue.Node<E> next)
-
casTail
boolean casTail(SingleConsumerQueue.Node<E> expect, SingleConsumerQueue.Node<E> update)
-
-