public interface IgniteSet<T> extends Set<T>, Closeable
Set
interface and provides all methods from collections.
Note that all Collection
methods in the set may throw IgniteException
in case of failure
or if set was removed.
collocated
parameter). Non-collocated
mode is provided only
for partitioned caches. If collocated
parameter is true
, then all set items
will be collocated on one node, otherwise items will be distributed through all grid nodes.Modifier and Type | Method and Description |
---|---|
boolean |
add(T t) |
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) |
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() |
Object[] |
toArray() |
<T1> T1[] |
toArray(T1[] a) |
<T1> IgniteSet<T1> |
withKeepBinary()
Returns Ignite set that operates on binary objects without deserialization.
|
equals, hashCode, spliterator
parallelStream, removeIf, stream
boolean add(T t) throws IgniteException
add
in interface Collection<T>
add
in interface Set<T>
IgniteException
boolean addAll(Collection<? extends T> c) throws IgniteException
addAll
in interface Collection<T>
addAll
in interface Set<T>
IgniteException
void clear() throws IgniteException
clear
in interface Collection<T>
clear
in interface Set<T>
IgniteException
boolean contains(Object o) throws IgniteException
contains
in interface Collection<T>
contains
in interface Set<T>
IgniteException
boolean containsAll(Collection<?> c) throws IgniteException
containsAll
in interface Collection<T>
containsAll
in interface Set<T>
IgniteException
boolean isEmpty() throws IgniteException
isEmpty
in interface Collection<T>
isEmpty
in interface Set<T>
IgniteException
Iterator<T> iterator() throws IgniteException
iterator
in interface Collection<T>
iterator
in interface Iterable<T>
iterator
in interface Set<T>
IgniteException
boolean remove(Object o) throws IgniteException
remove
in interface Collection<T>
remove
in interface Set<T>
IgniteException
boolean removeAll(Collection<?> c) throws IgniteException
removeAll
in interface Collection<T>
removeAll
in interface Set<T>
IgniteException
boolean retainAll(Collection<?> c) throws IgniteException
retainAll
in interface Collection<T>
retainAll
in interface Set<T>
IgniteException
int size() throws IgniteException
size
in interface Collection<T>
size
in interface Set<T>
IgniteException
Object[] toArray() throws IgniteException
toArray
in interface Collection<T>
toArray
in interface Set<T>
IgniteException
<T1> T1[] toArray(T1[] a) throws IgniteException
toArray
in interface Collection<T>
toArray
in interface Set<T>
IgniteException
void close() throws IgniteException
removed()
.close
in interface AutoCloseable
close
in interface Closeable
IgniteException
- If operation failed.String name()
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.True
if this set is in collocated
mode false
otherwise.boolean removed()
close()
method.True
if set was removed from cache false
otherwise.void affinityRun(IgniteRunnable job) throws IgniteException
This is not supported for non-collocated sets.
job
- Job which will be co-located with the set.IgniteException
- If job failed.<R> R affinityCall(IgniteCallable<R> job) throws IgniteException
This is not supported for non-collocated sets.
R
- Type of the job result.job
- Job which will be co-located with the set.IgniteException
- If job failed.<T1> IgniteSet<T1> withKeepBinary()
T1
- Type of binary objects.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023