public class GridBoundedConcurrentOrderedSet<E> extends GridConcurrentSkipListSet<E>
Note that due to concurrent nature of this set, it may grow slightly larger than its maximum allowed size, but in this case it will quickly readjust back to allowed size.
Note that remove(Object) method is not supported for this kind of set.
| Constructor and Description |
|---|
GridBoundedConcurrentOrderedSet(int max)
Constructs a new, empty set that orders its elements according to
their natural ordering.
|
GridBoundedConcurrentOrderedSet(int max,
Collection<? extends E> c)
Constructs a new set containing the elements in the specified
collection, that orders its elements according to their
natural ordering.
|
GridBoundedConcurrentOrderedSet(int max,
Comparator<? super E> comp)
Constructs a new, empty set that orders its elements according to
the specified comparator.
|
GridBoundedConcurrentOrderedSet(int max,
SortedSet<E> s)
Constructs a new set containing the same elements and using the
same ordering as the specified sorted set.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
GridBoundedConcurrentOrderedSet<E> |
clone() |
boolean |
remove(Object o)
This method is not supported and always throws
UnsupportedOperationException. |
int |
size()
Approximate size at this point of time.
|
ceiling, clear, comparator, contains, descendingIterator, descendingSet, equals, first, firstx, floor, hashCode, headSet, headSet, higher, isEmpty, iterator, last, lastx, lower, pollFirst, pollLast, removeAll, subSet, subSet, tailSet, tailSetaddAll, containsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streampublic GridBoundedConcurrentOrderedSet(int max)
max - Upper bound of this set.public GridBoundedConcurrentOrderedSet(int max,
Comparator<? super E> comp)
max - Upper bound of this set.comp - the comparator that will be used to order this set.
If null, the natural
ordering of the elements will be used.public GridBoundedConcurrentOrderedSet(int max,
Collection<? extends E> c)
max - Upper bound of this set.c - The elements that will comprise the new setClassCastException - if the elements in c are
not Comparable, or are not mutually comparableNullPointerException - if the specified collection or any
of its elements are null.public GridBoundedConcurrentOrderedSet(int max,
SortedSet<E> s)
max - Upper bound of this set.s - sorted set whose elements will comprise the new setNullPointerException - if the specified sorted set or any
of its elements are null.public boolean add(E e)
add in interface Collection<E>add in interface Set<E>add in class GridConcurrentSkipListSet<E>public int size()
size
methods on other concurrent collections, this method executes
in constant time without traversal of the elements.size in interface Collection<E>size in interface Set<E>size in class GridConcurrentSkipListSet<E>public GridBoundedConcurrentOrderedSet<E> clone()
clone in class GridConcurrentSkipListSet<E>public boolean remove(Object o)
UnsupportedOperationException.remove in interface Collection<E>remove in interface Set<E>remove in class GridConcurrentSkipListSet<E>o -
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018