com.hazelcast.client.proxy

## Class ClientListProxy<E>

- java.lang.Object
- - com.hazelcast.client.spi.ClientProxy
  - - com.hazelcast.client.proxy.ClientListProxy<E>

- Type Parameters:
    `E` - the type of elements in this list
  All Implemented Interfaces:
    DistributedObject, ICollection<E>, IList<E>, Iterable<E>, Collection<E>, List<E>

      public class ClientListProxy<E>
      extends ClientProxy
      implements IList<E>

  Proxy implementation of `IList`.

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.client.spi.ClientProxy

      `name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientListProxy(String serviceName, String name, ClientContext context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(E e)`
    `void` | `add(int index, E element)`
    `boolean` | `addAll(Collection<? extends E> c)`
    `boolean` | `addAll(int index, 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)`
    `E` | `get(int index)`
    `int` | `indexOf(Object o)`
    `protected com.hazelcast.client.impl.protocol.ClientMessage` | `invokeOnPartition(com.hazelcast.client.impl.protocol.ClientMessage req)`
    `protected <T> T` | `invokeOnPartition(com.hazelcast.client.impl.protocol.ClientMessage clientMessage, long invocationTimeoutSeconds)`
    `protected <T> ClientDelegatingFuture<T>` | `invokeOnPartitionAsync(com.hazelcast.client.impl.protocol.ClientMessage clientMessage, com.hazelcast.client.impl.ClientMessageDecoder clientMessageDecoder)`
    `protected <T> T` | `invokeOnPartitionInterruptibly(com.hazelcast.client.impl.protocol.ClientMessage clientMessage)`
    `protected <T> T` | `invokeOnPartitionInterruptibly(com.hazelcast.client.impl.protocol.ClientMessage clientMessage, long invocationTimeoutSeconds)`
    `boolean` | `isEmpty()`
    `Iterator<E>` | `iterator()`
    `int` | `lastIndexOf(Object o)`
    `ListIterator<E>` | `listIterator()`
    `ListIterator<E>` | `listIterator(int index)`
    `protected void` | `onInitialize()` Called when proxy is created.
    `E` | `remove(int index)`
    `boolean` | `remove(Object o)`
    `boolean` | `removeAll(Collection<?> c)`
    `boolean` | `removeItemListener(String registrationId)` Removes the specified item listener.
    `boolean` | `retainAll(Collection<?> c)`
    `E` | `set(int index, E element)`
    `int` | `size()`
    `List<E>` | `subList(int fromIndex, int toIndex)`
    `Object[]` | `toArray()`
    `<T> T[]` | `toArray(T[] a)`
    `String` | `toString()`

    - ### Methods inherited from class com.hazelcast.client.spi.ClientProxy

      `deregisterListener, destroy, destroyLocally, destroyRemotely, equals, getClient, getConnectedServerVersion, getContext, getDistributedObjectName, getId, getName, getPartitionKey, getSerializationService, getServiceName, hashCode, invoke, invoke, invokeOnAddress, invokeOnPartition, invokeOnPartitionInterruptibly, onDestroy, onShutdown, postDestroy, preDestroy, registerListener, setContext, toData, toObject`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.List

      `equals, hashCode, replaceAll, sort, spliterator`

    - ### Methods inherited from interface com.hazelcast.core.ICollection

      `getName`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

    - ### Methods inherited from interface com.hazelcast.core.DistributedObject

      `destroy, getPartitionKey, getServiceName`

- - ### Constructor Detail

    - #### ClientListProxy

          public ClientListProxy(String serviceName,
                                 String name,
                                 ClientContext context)

  - ### Method Detail

    - #### addAll

          public boolean addAll(int index,
                                Collection<? extends E> c)

      Specified by:
        `addAll` in interface `List<E>`

    - #### get

          public E get(int index)

      Specified by:
        `get` in interface `List<E>`

    - #### set

          public E set(int index,
                       E element)

      Specified by:
        `set` in interface `List<E>`

    - #### add

          public void add(int index,
                          E element)

      Specified by:
        `add` in interface `List<E>`

    - #### remove

          public E remove(int index)

      Specified by:
        `remove` in interface `List<E>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<E>`
      Specified by:
        `size` in interface `List<E>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `Collection<E>`
      Specified by:
        `isEmpty` in interface `List<E>`

    - #### contains

          public boolean contains(Object o)

      Specified by:
        `contains` in interface `Collection<E>`
      Specified by:
        `contains` in interface `List<E>`

    - #### iterator

          public Iterator<E> iterator()

      Specified by:
        `iterator` in interface `Iterable<E>`
      Specified by:
        `iterator` in interface `Collection<E>`
      Specified by:
        `iterator` in interface `List<E>`

    - #### toArray

          public Object[] toArray()

      Specified by:
        `toArray` in interface `Collection<E>`
      Specified by:
        `toArray` in interface `List<E>`

    - #### toArray

          public <T> T[] toArray(T[] a)

      Specified by:
        `toArray` in interface `Collection<E>`
      Specified by:
        `toArray` in interface `List<E>`

    - #### add

          public boolean add(E e)

      Specified by:
        `add` in interface `Collection<E>`
      Specified by:
        `add` in interface `List<E>`

    - #### remove

          public boolean remove(Object o)

      Specified by:
        `remove` in interface `Collection<E>`
      Specified by:
        `remove` in interface `List<E>`

    - #### containsAll

          public boolean containsAll(Collection<?> c)

      Specified by:
        `containsAll` in interface `Collection<E>`
      Specified by:
        `containsAll` in interface `List<E>`

    - #### addAll

          public boolean addAll(Collection<? extends E> c)

      Specified by:
        `addAll` in interface `Collection<E>`
      Specified by:
        `addAll` in interface `List<E>`

    - #### removeAll

          public boolean removeAll(Collection<?> c)

      Specified by:
        `removeAll` in interface `Collection<E>`
      Specified by:
        `removeAll` in interface `List<E>`

    - #### retainAll

          public boolean retainAll(Collection<?> c)

      Specified by:
        `retainAll` in interface `Collection<E>`
      Specified by:
        `retainAll` in interface `List<E>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Collection<E>`
      Specified by:
        `clear` in interface `List<E>`

    - #### addItemListener

          public String addItemListener(ItemListener<E> listener,
                                        boolean includeValue)

      Description copied from interface: `ICollection`
      Adds an item listener for this collection. The 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

    - #### lastIndexOf

          public int lastIndexOf(Object o)

      Specified by:
        `lastIndexOf` in interface `List<E>`

    - #### indexOf

          public int indexOf(Object o)

      Specified by:
        `indexOf` in interface `List<E>`

    - #### listIterator

          public ListIterator<E> listIterator()

      Specified by:
        `listIterator` in interface `List<E>`

    - #### listIterator

          public ListIterator<E> listIterator(int index)

      Specified by:
        `listIterator` in interface `List<E>`

    - #### subList

          public List<E> subList(int fromIndex,
                                 int toIndex)

      Specified by:
        `subList` in interface `List<E>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### onInitialize

          protected void onInitialize()

      Description copied from class: `ClientProxy`
      Called when proxy is created. Overriding implementations can add initialization specific logic into this method like registering a listener, creating a cleanup task etc.
      Overrides:
        `onInitialize` in class `ClientProxy`

    - #### invokeOnPartition

          protected com.hazelcast.client.impl.protocol.ClientMessage invokeOnPartition(com.hazelcast.client.impl.protocol.ClientMessage req)

    - #### invokeOnPartitionInterruptibly

          protected <T> T invokeOnPartitionInterruptibly(com.hazelcast.client.impl.protocol.ClientMessage clientMessage)
                                                  throws InterruptedException

      Throws:
        `InterruptedException`

    - #### invokeOnPartitionAsync

          protected <T> ClientDelegatingFuture<T> invokeOnPartitionAsync(com.hazelcast.client.impl.protocol.ClientMessage clientMessage,
                                                                         com.hazelcast.client.impl.ClientMessageDecoder clientMessageDecoder)

    - #### invokeOnPartition

          protected <T> T invokeOnPartition(com.hazelcast.client.impl.protocol.ClientMessage clientMessage,
                                            long invocationTimeoutSeconds)

    - #### invokeOnPartitionInterruptibly

          protected <T> T invokeOnPartitionInterruptibly(com.hazelcast.client.impl.protocol.ClientMessage clientMessage,
                                                         long invocationTimeoutSeconds)
                                                  throws InterruptedException

      Throws:
        `InterruptedException`

Copyright © 2018. All rights reserved.