com.hazelcast.client.proxy
Class AbstractClientCollectionProxy<E>

java.lang.Object
  extended by com.hazelcast.client.spi.ClientProxy
      extended by 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>


Field Summary
protected  String partitionKey
           
 
Constructor Summary
AbstractClientCollectionProxy(String serviceName, String name)
           
 
Method Summary
 boolean add(E e)
           
 boolean addAll(Collection<? extends E> c)
           
 String addItemListener(ItemListener<E> listener, boolean includeValue)
          Adds an item listener for this collection.
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
protected
<T> T
invoke(ClientRequest req)
           
 boolean isEmpty()
           
 Iterator<E> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean removeItemListener(String registrationId)
          Removes the specified item listener.
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hazelcast.core.ICollection
getName
 
Methods inherited from interface java.util.Collection
equals, hashCode
 
Methods inherited from interface com.hazelcast.core.DistributedObject
destroy, getId, getPartitionKey, getServiceName
 

Field Detail

partitionKey

protected final String partitionKey
Constructor Detail

AbstractClientCollectionProxy

public AbstractClientCollectionProxy(String serviceName,
                                     String name)
Method Detail

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 listener
includeValue - 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.