public class GridConcurrentWeakHashSet<E> extends Object implements Set<E>
| Constructor and Description |
|---|
GridConcurrentWeakHashSet()
Creates a new, empty set with a default initial capacity,
load factor, and concurrencyLevel.
|
GridConcurrentWeakHashSet(Collection<E> c)
Constructs a new set containing the elements in the specified
collection, with default load factor and an initial
capacity sufficient to contain the elements in the specified collection.
|
GridConcurrentWeakHashSet(int initCap)
Creates a new, empty set with the specified initial
capacity, and with default load factor and concurrencyLevel.
|
GridConcurrentWeakHashSet(int initCap,
float loadFactor,
int conLevel)
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) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
protected void |
onGc(E e)
This method is called on every element when it gets GC-ed.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
public GridConcurrentWeakHashSet()
public GridConcurrentWeakHashSet(int initCap)
initCap - The initial capacity. The implementation
performs internal sizing to accommodate this many elements.IllegalArgumentException - if the initial capacity of
elements is negative.public GridConcurrentWeakHashSet(int initCap,
float loadFactor,
int conLevel)
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.conLevel - 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 concurrency level are
non-positive.public GridConcurrentWeakHashSet(Collection<E> c)
c - Collection to add.public boolean add(E e)
public boolean addAll(@Nullable
Collection<? extends E> c)
public boolean retainAll(@Nullable
Collection<?> c)
public int size()
public boolean isEmpty()
public boolean contains(@Nullable
Object o)
public boolean containsAll(@Nullable
Collection<?> c)
containsAll in interface Collection<E>containsAll in interface Set<E>public Object[] toArray()
public <T> T[] toArray(T[] a)
public void clear()
public boolean remove(@Nullable
Object o)
public boolean removeAll(@Nullable
Collection<?> c)
public boolean equals(@Nullable
Object o)
public int hashCode()
protected void onGc(E e)
e - Element that is about to get GC-ed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.9.0 Release Date : March 2 2017