Interface ConcurrentDirectDeque<E>
- Type Parameters:
E- the element type
- All Superinterfaces:
Collection<E>,Deque<E>,Iterable<E>,Queue<E>
- All Known Implementing Classes:
FastConcurrentDirectDeque
A concurrent deque that allows direct item removal without traversal.
- Author:
- Jason T. Greene, Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleandefault Eelement()static <K> ConcurrentDirectDeque<K> default booleanEquivalent toDeque.offerFirst(Object), but returns a token used for fast removal.Equivalent toDeque.offerLast(Object), but returns a token used for fast removal.default Epeek()default Epoll()default Epop()default voiddefault Eremove()default booleanvoidremoveToken(Object token) Removes the element associated with the given token.Methods inherited from interface java.util.Collection
clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface java.util.Deque
addAll, addFirst, addLast, contains, descendingIterator, getFirst, getLast, iterator, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size
-
Method Details
-
newInstance
-
offerFirstAndReturnToken
Equivalent toDeque.offerFirst(Object), but returns a token used for fast removal.- Parameters:
e- the element to offer- Returns:
- a token suitable for use by
remove(Object)
-
offerLastAndReturnToken
Equivalent toDeque.offerLast(Object), but returns a token used for fast removal.- Parameters:
e- the element to offer- Returns:
- a token suitable for use by
remove(Object)
-
removeToken
Removes the element associated with the given token.- Parameters:
token- the token returned viaofferFirstAndReturnToken(Object)orofferLastAndReturnToken(Object).
-
add
-
remove
-
peek
-
pop
-
push
-
element
-
offer
-
poll
-
remove
-