Package org.apache.ignite
Interface IgniteSet<T>
- 
- All Superinterfaces:
- AutoCloseable,- Closeable,- Collection<T>,- Iterable<T>,- Set<T>
 
 public interface IgniteSet<T> extends Set<T>, Closeable Set implementation based on on In-Memory Data Grid.OverviewCache set implementsSetinterface and provides all methods from collections. Note that allCollectionmethods in the set may throwIgniteExceptionin case of failure or if set was removed.Collocated vs Non-collocatedSet items can be placed on one node or distributed throughout grid nodes (governed bycollocatedparameter).Non-collocatedmode is provided only for partitioned caches. Ifcollocatedparameter istrue, then all set items will be collocated on one node, otherwise items will be distributed through all grid nodes.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> c)<R> RaffinityCall(IgniteCallable<R> job)Executes given job on collocated set on the node where the set is located (a.k.a. affinity co-location).voidaffinityRun(IgniteRunnable job)Executes given job on collocated set on the node where the set is located (a.k.a. affinity co-location).voidclear()voidclose()Removes this set.booleancollocated()Returnstrueif this set can be kept on the one node only.booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()Iterator<T>iterator()Stringname()Gets set name.booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoved()Gets status of set.booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T1> T1[]toArray(T1[] a)<T1> IgniteSet<T1>withKeepBinary()Returns Ignite set that operates on binary objects without deserialization.- 
Methods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArray
 - 
Methods inherited from interface java.util.Setequals, hashCode, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
addboolean add(T t) throws IgniteException - Specified by:
- addin interface- Collection<T>
- Specified by:
- addin interface- Set<T>
- Throws:
- IgniteException
 
 - 
addAllboolean addAll(Collection<? extends T> c) throws IgniteException - Specified by:
- addAllin interface- Collection<T>
- Specified by:
- addAllin interface- Set<T>
- Throws:
- IgniteException
 
 - 
clearvoid clear() throws IgniteException- Specified by:
- clearin interface- Collection<T>
- Specified by:
- clearin interface- Set<T>
- Throws:
- IgniteException
 
 - 
containsboolean contains(Object o) throws IgniteException - Specified by:
- containsin interface- Collection<T>
- Specified by:
- containsin interface- Set<T>
- Throws:
- IgniteException
 
 - 
containsAllboolean containsAll(Collection<?> c) throws IgniteException - Specified by:
- containsAllin interface- Collection<T>
- Specified by:
- containsAllin interface- Set<T>
- Throws:
- IgniteException
 
 - 
isEmptyboolean isEmpty() throws IgniteException- Specified by:
- isEmptyin interface- Collection<T>
- Specified by:
- isEmptyin interface- Set<T>
- Throws:
- IgniteException
 
 - 
iteratorIterator<T> iterator() throws IgniteException - Specified by:
- iteratorin interface- Collection<T>
- Specified by:
- iteratorin interface- Iterable<T>
- Specified by:
- iteratorin interface- Set<T>
- Throws:
- IgniteException
 
 - 
removeboolean remove(Object o) throws IgniteException - Specified by:
- removein interface- Collection<T>
- Specified by:
- removein interface- Set<T>
- Throws:
- IgniteException
 
 - 
removeAllboolean removeAll(Collection<?> c) throws IgniteException - Specified by:
- removeAllin interface- Collection<T>
- Specified by:
- removeAllin interface- Set<T>
- Throws:
- IgniteException
 
 - 
retainAllboolean retainAll(Collection<?> c) throws IgniteException - Specified by:
- retainAllin interface- Collection<T>
- Specified by:
- retainAllin interface- Set<T>
- Throws:
- IgniteException
 
 - 
sizeint size() throws IgniteException - Specified by:
- sizein interface- Collection<T>
- Specified by:
- sizein interface- Set<T>
- Throws:
- IgniteException
 
 - 
toArrayObject[] toArray() throws IgniteException - Specified by:
- toArrayin interface- Collection<T>
- Specified by:
- toArrayin interface- Set<T>
- Throws:
- IgniteException
 
 - 
toArray<T1> T1[] toArray(T1[] a) throws IgniteException- Specified by:
- toArrayin interface- Collection<T>
- Specified by:
- toArrayin interface- Set<T>
- Throws:
- IgniteException
 
 - 
closevoid close() throws IgniteExceptionRemoves this set. In order to check the state it is possible to useremoved().- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IgniteException- If operation failed.
 
 - 
nameString name() Gets set name.- Returns:
- Set name.
 
 - 
collocatedboolean collocated() Returnstrueif this set can be kept on the one node only. Returnsfalseif this set can be kept on the many nodes.- Returns:
- Trueif this set is in- collocatedmode- falseotherwise.
 
 - 
removedboolean removed() Gets status of set. In order to change the status it is possible to useclose()method.- Returns:
- Trueif set was removed from cache- falseotherwise.
 
 - 
affinityRunvoid affinityRun(IgniteRunnable job) throws IgniteException Executes given job on collocated set on the node where the set is located (a.k.a. affinity co-location).This is not supported for non-collocated sets. - Parameters:
- job- Job which will be co-located with the set.
- Throws:
- IgniteException- If job failed.
 
 - 
affinityCall<R> R affinityCall(IgniteCallable<R> job) throws IgniteException Executes given job on collocated set on the node where the set is located (a.k.a. affinity co-location).This is not supported for non-collocated sets. - Type Parameters:
- R- Type of the job result.
- Parameters:
- job- Job which will be co-located with the set.
- Returns:
- Job result.
- Throws:
- IgniteException- If job failed.
 
 - 
withKeepBinary<T1> IgniteSet<T1> withKeepBinary() Returns Ignite set that operates on binary objects without deserialization.- Type Parameters:
- T1- Type of binary objects.
- Returns:
- New set instance for binary objects.
 
 
- 
 
-