public class GridBoundedConcurrentLinkedHashSet<E> extends GridSetWrapper<E>
map, VAL
Constructor and Description |
---|
GridBoundedConcurrentLinkedHashSet(int max)
Creates a new, empty set with specified order and default initial capacity (16),
load factor (0.75) and concurrencyLevel (16).
|
GridBoundedConcurrentLinkedHashSet(int max,
int initCap)
Creates a new, empty set with the specified initial capacity,
and with default load factor (0.75) and concurrencyLevel (16).
|
GridBoundedConcurrentLinkedHashSet(int max,
int initCap,
float loadFactor)
Creates a new, empty set with the specified initial capacity
and load factor and with the default concurrencyLevel (16).
|
GridBoundedConcurrentLinkedHashSet(int max,
int initCap,
float loadFactor,
int concurLvl)
Creates a new, empty set with the specified initial
capacity, load factor and concurrency level.
|
GridBoundedConcurrentLinkedHashSet(int max,
int initCap,
float loadFactor,
int concurLvl,
ConcurrentLinkedHashMap.QueuePolicy qPlc)
Creates a new, empty set with the specified initial
capacity, load factor and concurrency level.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Note that unlike regular add operation on a set, this method will only
add the passed in element if it's not already present in set.
|
E |
addx(E e)
Note that unlike regular add operation on a set, this method will only
add the passed in element if it's not already present in set.
|
int |
sizex() |
String |
toString() |
clear, contains, defaultValue, isEmpty, iterator, map, remove, size, toArray, toArray
equals, hashCode, removeAll
addAll, containsAll, retainAll
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, retainAll
public GridBoundedConcurrentLinkedHashSet(int max)
max
- Upper bound of this set.public GridBoundedConcurrentLinkedHashSet(int max, int initCap)
max
- Upper bound of this set.initCap
- the initial capacity. The implementation
performs internal sizing to accommodate this many elements.IllegalArgumentException
- if the initial capacity of
elements is negative.public GridBoundedConcurrentLinkedHashSet(int max, int initCap, float loadFactor)
max
- Upper bound of this set.initCap
- The implementation performs internal
sizing to accommodate this many elements.loadFactor
- the load factor threshold, used to control resizing.
Resizing may be performed when the average number of elements per
bin exceeds this threshold.IllegalArgumentException
- if the initial capacity of
elements is negative or the load factor is nonpositive.public GridBoundedConcurrentLinkedHashSet(int max, int initCap, float loadFactor, int concurLvl)
max
- Upper bound of this set.initCap
- the initial capacity. The implementation
performs internal sizing to accommodate this many elements.loadFactor
- the load factor threshold, used to control resizing.
Resizing may be performed when the average number of elements per
bin exceeds this threshold.concurLvl
- the estimated number of concurrently
updating threads. The implementation performs internal sizing
to try to accommodate this many threads.IllegalArgumentException
- if the initial capacity is
negative or the load factor or concurLvl are
nonpositive.public GridBoundedConcurrentLinkedHashSet(int max, int initCap, float loadFactor, int concurLvl, ConcurrentLinkedHashMap.QueuePolicy qPlc)
max
- Upper bound of this set.initCap
- the initial capacity. The implementation
performs internal sizing to accommodate this many elements.loadFactor
- the load factor threshold, used to control resizing.
Resizing may be performed when the average number of elements per
bin exceeds this threshold.concurLvl
- the estimated number of concurrently
updating threads. The implementation performs internal sizing
to try to accommodate this many threads.qPlc
- Queue policy.IllegalArgumentException
- if the initial capacity is
negative or the load factor or concurLvl are
nonpositive.public boolean add(E e)
add
in interface Collection<E>
add
in interface Set<E>
add
in class GridSetWrapper<E>
e
- Element to add.True
if element was added.@Nullable public E addx(E e)
e
- Element to add.null
if set didn't have this value.public int sizex()
public String toString()
toString
in class GridSetWrapper<E>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017