com.hazelcast.client.proxy
Class AbstractClientCollectionProxy<E>
java.lang.Object
com.hazelcast.client.spi.ClientProxy
com.hazelcast.client.proxy.AbstractClientCollectionProxy<E>
- All Implemented Interfaces:
- DistributedObject, ICollection<E>, Iterable<E>, Collection<E>
- Direct Known Subclasses:
- ClientListProxy, ClientSetProxy
public class AbstractClientCollectionProxy<E>
- extends ClientProxy
- implements ICollection<E>
Methods inherited from class com.hazelcast.client.spi.ClientProxy |
destroy, equals, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeInterruptibly, listen, listen, onDestroy, onInitialize, onShutdown, setContext, stopListening, throwExceptionIfNull, toData, toObject |
partitionKey
protected final String partitionKey
AbstractClientCollectionProxy
public AbstractClientCollectionProxy(String serviceName,
String name)
size
public int size()
- Specified by:
size
in interface Collection<E>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection<E>
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection<E>
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interface Iterable<E>
- Specified by:
iterator
in interface Collection<E>
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection<E>
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interface Collection<E>
add
public boolean add(E e)
- Specified by:
add
in interface Collection<E>
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection<E>
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interface Collection<E>
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAll
in interface Collection<E>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interface Collection<E>
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interface Collection<E>
clear
public void clear()
- Specified by:
clear
in interface Collection<E>
addItemListener
public String addItemListener(ItemListener<E> listener,
boolean includeValue)
- Description copied from interface:
ICollection
- Adds an item listener for this collection. Listener will be notified
for all collection add/remove events.
- Specified by:
addItemListener
in interface ICollection<E>
- Parameters:
listener
- the item listenerincludeValue
- true if the updated item should be passed
to the item listener, false otherwise.
- Returns:
- returns the registration id.
removeItemListener
public boolean removeItemListener(String registrationId)
- Description copied from interface:
ICollection
- Removes the specified item listener.
Returns silently if the specified listener was not added before.
- Specified by:
removeItemListener
in interface ICollection<E>
- Parameters:
registrationId
- Id of the listener registration.
- Returns:
- true if the item listener is removed, false otherwise
invoke
protected <T> T invoke(ClientRequest req)
- Overrides:
invoke
in class ClientProxy
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.