Package io.atomix.client.collection
Interface DistributedCollection<E>
- All Superinterfaces:
Collection<E>,DistributedPrimitive,Iterable<E>,SyncIterable<E>,SyncPrimitive<DistributedCollection<E>,AsyncDistributedCollection<E>>
- All Known Subinterfaces:
DistributedMultiset<E>,DistributedSet<E>
public interface DistributedCollection<E>
extends SyncPrimitive<DistributedCollection<E>,AsyncDistributedCollection<E>>, SyncIterable<E>, Collection<E>
Distributed collection.
-
Field Summary
Fields inherited from interface io.atomix.client.SyncPrimitive
DEFAULT_OPERATION_TIMEOUT -
Method Summary
Modifier and TypeMethodDescriptionasync()Returns the underlying asynchronous primitive.iterator()Returns the synchronous iterator.default Cancellablelisten(CollectionEventListener<E> listener) Registers the specified listener to be notified whenever the collection is updated.listen(CollectionEventListener<E> listener, Executor executor) Registers the specified listener to be notified whenever the collection is updated.Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface io.atomix.client.DistributedPrimitive
nameMethods inherited from interface io.atomix.client.SyncPrimitive
close
-
Method Details
-
iterator
SyncIterator<E> iterator()Description copied from interface:SyncIterableReturns the synchronous iterator.- Specified by:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>- Specified by:
iteratorin interfaceSyncIterable<E>- Returns:
- the synchronous iterator
-
listen
Registers the specified listener to be notified whenever the collection is updated.- Parameters:
listener- listener to notify about collection update events- Returns:
- a cancellable to be used to cancel the listener
-
listen
Registers the specified listener to be notified whenever the collection is updated.- Parameters:
listener- listener to notify about collection update events- Returns:
- a cancellable to be used to cancel the listener
-
async
AsyncDistributedCollection<E> async()Description copied from interface:SyncPrimitiveReturns the underlying asynchronous primitive.- Specified by:
asyncin interfaceSyncPrimitive<DistributedCollection<E>,AsyncDistributedCollection<E>> - Returns:
- the underlying asynchronous primitive
-