E
- set element typepublic class DefaultDistributedSet<E> extends Synchronous<AsyncDistributedSet<E>> implements DistributedSet<E>
DistributedSet
that merely delegates to a AsyncDistributedSet
and waits for the operation to complete.DistributedPrimitive.Status, DistributedPrimitive.Type
DEFAULT_OPERATION_TIMEOUT_MILLIS
Constructor and Description |
---|
DefaultDistributedSet(AsyncDistributedSet<E> asyncSet,
long operationTimeoutMillis) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
void |
addListener(SetEventListener<E> listener)
Registers the specified listener to be notified whenever
the set is updated.
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
void |
removeListener(SetEventListener<E> listener)
Unregisters the specified listener.
|
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
destroy, name, primitiveType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, spliterator
parallelStream, removeIf, stream
addStatusChangeListener, applicationId, destroy, name, primitiveType, removeStatusChangeListener, statusChangeListeners
public DefaultDistributedSet(AsyncDistributedSet<E> asyncSet, long operationTimeoutMillis)
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
public boolean addAll(Collection<? extends E> c)
public boolean retainAll(Collection<?> c)
public boolean removeAll(Collection<?> c)
public void clear()
public void addListener(SetEventListener<E> listener)
DistributedSet
addListener
in interface DistributedSet<E>
listener
- listener to notify about set update eventspublic void removeListener(SetEventListener<E> listener)
DistributedSet
removeListener
in interface DistributedSet<E>
listener
- listener to unregister.