public class GridConcurrentPhantomHashSet<E> extends Object implements Set<E>
Constructor and Description |
---|
GridConcurrentPhantomHashSet()
Creates a new, empty set with a default initial capacity,
load factor, and concurrencyLevel.
|
GridConcurrentPhantomHashSet(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.
|
GridConcurrentPhantomHashSet(int initCap)
Creates a new, empty set with the specified initial
capacity, and with default load factor and concurrencyLevel.
|
GridConcurrentPhantomHashSet(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 GridConcurrentPhantomHashSet()
public GridConcurrentPhantomHashSet(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 GridConcurrentPhantomHashSet(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 GridConcurrentPhantomHashSet(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. 2.0.0 Release Date : April 30 2017