Interface ClientIgniteSet<T>
- 
- All Superinterfaces:
- AutoCloseable,- Closeable,- Collection<T>,- Iterable<T>,- Set<T>
 
 public interface ClientIgniteSet<T> extends Set<T>, Closeable Distributed Set.OverviewCache set implementsSetinterface and provides all methods from collections.Colocated vs Non-colocatedSet items can be placed on one node or distributed across grid nodes (governed byClientCollectionConfiguration.setColocated(boolean)parameter).Non-colocatedmode is provided only for partitioned caches. Ifcolocatedparameter istrue, then all set items will be colocated on one node, otherwise items will be distributed across all grid nodes.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(T o)booleanaddAll(Collection<? extends T> c)voidclear()voidclose()Removes this set.booleancolocated()Gets a value indicating whether all items of this set are stored on a single node.booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()ClientAutoCloseableIterator<T>iterator()Returns an iterator over the elements in this collection.Stringname()Gets set name.intpageSize()Gets the page size to be used for batched network data retrieval initerator()andtoArray().ClientIgniteSet<T>pageSize(int pageSize)Sets the page size to be used for batched network data retrieval initerator()andtoArray().booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoved()Gets a value indicating whether this set has been removed (close()was called).booleanretainAll(Collection<?> c)booleanserverKeepBinary()Gets a value indicating whether user objects should be kept in binary form on the server, or deserialized.ClientIgniteSet<T>serverKeepBinary(boolean keepBinary)Sets a value indicating whether user objects should be kept in binary form on the server, or deserialized.intsize()Object[]toArray()<T1> T1[]toArray(T1[] a)- 
Methods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArray
 - 
Methods inherited from interface java.util.Setequals, hashCode, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
addboolean add(T o) 
 - 
addAllboolean addAll(Collection<? extends T> c) 
 - 
clearvoid clear() 
 - 
containsboolean contains(Object o) 
 - 
containsAllboolean containsAll(Collection<?> c) - Specified by:
- containsAllin interface- Collection<T>
- Specified by:
- containsAllin interface- Set<T>
 
 - 
isEmptyboolean isEmpty() 
 - 
iteratorClientAutoCloseableIterator<T> iterator() Returns an iterator over the elements in this collection.There are no guarantees concerning the order in which the elements are returned. Returned iterator is AutoCloseable: it may hold server-side resources and must be closed. It will close itself when the last page of data (seepageSize()) is fetched from the server. WhenIterator.hasNext()returnsfalse, it is guaranteed that the iterator is closed. In other cases (incomplete iteration) the user must close the iterator.
 - 
removeboolean remove(Object o) 
 - 
removeAllboolean removeAll(Collection<?> c) 
 - 
retainAllboolean retainAll(Collection<?> c) 
 - 
sizeint size() 
 - 
toArrayObject[] toArray() 
 - 
toArray<T1> T1[] toArray(T1[] a) 
 - 
closevoid close() Removes this set.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 - 
nameString name() Gets set name.- Returns:
- Set name.
 
 - 
colocatedboolean colocated() Gets a value indicating whether all items of this set are stored on a single node.- Returns:
- Trueif all items of this set are stored on a single node,- falseotherwise.
 
 - 
removedboolean removed() Gets a value indicating whether this set has been removed (close()was called).- Returns:
- Trueif set was removed from cache,- falseotherwise.
 
 - 
serverKeepBinaryClientIgniteSet<T> serverKeepBinary(boolean keepBinary) Sets a value indicating whether user objects should be kept in binary form on the server, or deserialized.Default is true: does not require classes on server, interoperable with other thin clients, performs better. Suitable for most use cases.Set to falseif there is a requirement to use deserialized objects in "thick" API (IgniteSet) together with thin client API, like in this scenario:ClientIgniteSet<UserObj> clientSet = client.set("my-set", new ClientCollectionConfiguration()); clientSet.serverKeepBinary(false); IgniteSet<UserObj> serverSet = server.set(clientSet.name(), null); clientSet.add(new UserObj(1, "client")); assert serverSet.contains(new UserObj(1, "client"));- Parameters:
- keepBinary- Whether to keep objects in binary form on the server.
- Returns:
- This set instance (for chaining).
 
 - 
serverKeepBinaryboolean serverKeepBinary() Gets a value indicating whether user objects should be kept in binary form on the server, or deserialized.Default is true: does not require classes on server, interoperable with other thin clients, performs better. Suitable for most use cases.Set to falseif there is a requirement to use deserialized objects in "thick" API (IgniteSet) together with thin client API, like in this scenario:ClientIgniteSet<UserObj> clientSet = client.set("my-set", new ClientCollectionConfiguration()); clientSet.serverKeepBinary(false); IgniteSet<UserObj> serverSet = server.set(clientSet.name(), null); clientSet.add(new UserObj(1, "client")); assert serverSet.contains(new UserObj(1, "client"));- Returns:
- truewhen user objects will be kept in binary form on the server,- falseotherwise.
 
 - 
pageSizeClientIgniteSet<T> pageSize(int pageSize) Sets the page size to be used for batched network data retrieval initerator()andtoArray().- Parameters:
- pageSize- Page size.
- Returns:
- This set instance (for chaining).
 
 - 
pageSizeint pageSize() Gets the page size to be used for batched network data retrieval initerator()andtoArray().- Returns:
- Page size.
 
 
- 
 
-