Interface DistributedCollection<E>

All Superinterfaces:
Collection<E>, DistributedPrimitive, Iterable<E>, SyncIterable<E>, SyncPrimitive
All Known Subinterfaces:
DistributedMultiset<E>, DistributedSet<E>

public interface DistributedCollection<E> extends SyncPrimitive, SyncIterable<E>, Collection<E>
Distributed collection.
  • Method Details

    • iterator

      SyncIterator<E> iterator()
      Description copied from interface: SyncIterable
      Returns the synchronous iterator.
      Specified by:
      iterator in interface Collection<E>
      Specified by:
      iterator in interface Iterable<E>
      Specified by:
      iterator in interface SyncIterable<E>
      Returns:
      the synchronous iterator
    • listen

      default Cancellable listen(CollectionEventListener<E> listener)
      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

      Cancellable listen(CollectionEventListener<E> listener, Executor executor)
      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

      Description copied from interface: SyncPrimitive
      Returns the underlying asynchronous primitive.
      Specified by:
      async in interface SyncPrimitive
      Returns:
      the underlying asynchronous primitive