public class GridCacheSetImpl<T> extends AbstractCollection<T> implements IgniteSet<T>
| Constructor and Description |
|---|
GridCacheSetImpl(GridCacheContext ctx,
String name,
GridCacheSetHeader hdr) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T o) |
boolean |
addAll(Collection<? extends T> c) |
<R> R |
affinityCall(IgniteCallable<R> job)
Executes given job on collocated set on the node where the set is located
(a.k.a. affinity co-location).
|
void |
affinityRun(IgniteRunnable job)
Executes given job on collocated set on the node where the set is located
(a.k.a. affinity co-location).
|
void |
clear() |
void |
close()
Removes this set.
|
boolean |
collocated()
Returns
true if this set can be kept on the one node only. |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
IgniteUuid |
id() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
String |
name()
Gets set name.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removed()
Gets status of set.
|
boolean |
retainAll(Collection<?> c) |
int |
size() |
String |
toString() |
toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, spliteratorparallelStream, removeIf, streampublic GridCacheSetImpl(GridCacheContext ctx, String name, GridCacheSetHeader hdr)
ctx - Cache context.name - Set name.hdr - Set header.public boolean collocated()
true if this set can be kept on the one node only.
Returns false if this set can be kept on the many nodes.collocated in interface IgniteSet<T>True if this set is in collocated mode false otherwise.public String name()
public boolean removed()
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public boolean add(T o)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface Set<T>containsAll in interface IgniteSet<T>containsAll in class AbstractCollection<T>public boolean addAll(Collection<? extends T> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public void affinityRun(IgniteRunnable job)
This is not supported for non-collocated sets.
affinityRun in interface IgniteSet<T>job - Job which will be co-located with the set.public <R> R affinityCall(IgniteCallable<R> job)
This is not supported for non-collocated sets.
affinityCall in interface IgniteSet<T>job - Job which will be co-located with the set.public void close()
public IgniteUuid id()
public String toString()
toString in class AbstractCollection<T>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019