Package io.atomix.client.set
Interface DistributedSet<E>
- Type Parameters:
E- set entry type
- All Superinterfaces:
Collection<E>,DistributedCollection<E>,DistributedPrimitive,Iterable<E>,Set<E>,SyncIterable<E>,SyncPrimitive<DistributedCollection<E>,AsyncDistributedCollection<E>>
A distributed collection designed for holding unique elements.
-
Field Summary
Fields inherited from interface io.atomix.client.SyncPrimitive
DEFAULT_OPERATION_TIMEOUT -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the specified element to this collection if it is not already present (optional operation).async()Returns the underlying asynchronous primitive.static <E> DistributedSetBuilder<E>builder(AtomixChannel channel) Returns a new DistributedSet builder.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface io.atomix.client.collection.DistributedCollection
iterator, listen, listenMethods inherited from interface io.atomix.client.DistributedPrimitive
nameMethods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayMethods inherited from interface io.atomix.client.SyncPrimitive
close
-
Method Details
-
builder
Returns a new DistributedSet builder.- Parameters:
channel- the AtomixChannel- Returns:
- the DistributedSet builder
-
add
Adds the specified element to this collection if it is not already present (optional operation).- Parameters:
element- element to add- Returns:
trueif this collection did not already contain the specified element.
-
async
AsyncDistributedSet<E> async()Description copied from interface:SyncPrimitiveReturns the underlying asynchronous primitive.- Specified by:
asyncin interfaceDistributedCollection<E>- Specified by:
asyncin interfaceSyncPrimitive<DistributedCollection<E>,AsyncDistributedCollection<E>> - Returns:
- the underlying asynchronous primitive
-