com.hazelcast.client.proxy.txn

## Class ClientTxnSetProxy<E>

- java.lang.Object
- - com.hazelcast.client.proxy.txn.ClientTxnSetProxy<E>

- Type Parameters:
    `E` - the type of elements in this set
  All Implemented Interfaces:
    DistributedObject, TransactionalSet<E>, TransactionalObject

      public class ClientTxnSetProxy<E>
      extends Object
      implements TransactionalSet<E>

  Proxy implementation of `TransactionalSet`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientTxnSetProxy(String name, ClientTransactionContext transactionContext)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(E e)` Add new item to transactional set.
    `void` | `destroy()` Destroys this object cluster-wide.
    `String` | `getName()` Returns the unique name for this DistributedObject.
    `String` | `getPartitionKey()` Returns the key of the partition that this DistributedObject is assigned to.
    `String` | `getServiceName()` Returns the service name for this object.
    `boolean` | `remove(E e)` Remove item from transactional set.
    `int` | `size()` Returns the size of the set.

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

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

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

      `destroy, getName, getPartitionKey`

- - ### Constructor Detail

    - #### ClientTxnSetProxy

          public ClientTxnSetProxy(String name,
                                   ClientTransactionContext transactionContext)

  - ### Method Detail

    - #### add

          public boolean add(E e)

      Description copied from interface: `TransactionalSet`
      Add new item to transactional set.
      Specified by:
        `add` in interface `TransactionalSet<E>`
      Parameters:
        `e` - item added to transactional set
      Returns:
        true if item is added successfully

    - #### remove

          public boolean remove(E e)

      Description copied from interface: `TransactionalSet`
      Remove item from transactional set.
      Specified by:
        `remove` in interface `TransactionalSet<E>`
      Parameters:
        `e` - item removed from transactional set
      Returns:
        true if item is remove successfully

    - #### size

          public int size()

      Description copied from interface: `TransactionalSet`
      Returns the size of the set.
      Specified by:
        `size` in interface `TransactionalSet<E>`
      Returns:
        the size of the set

    - #### getServiceName

          public String getServiceName()

      Description copied from interface: `DistributedObject`
      Returns the service name for this object.
      Specified by:
        `getServiceName` in interface `DistributedObject`
      Returns:
        the service name for this object.

    - #### getName

          public String getName()

      Description copied from interface: `DistributedObject`
      Returns the unique name for this DistributedObject. The returned value will never be null. The suggested way for getting name is retrieving it through `DistributedObjectUtil.getName(DistributedObject)` because this might be also a `PrefixedDistributedObject`.
      Specified by:
        `getName` in interface `DistributedObject`
      Returns:
        the unique name for this object.

    - #### getPartitionKey

          public String getPartitionKey()

      Description copied from interface: `DistributedObject`
      Returns the key of the partition that this DistributedObject is assigned to. The returned value only has meaning for a non-partitioned data structure like an `IAtomicLong`. For a partitioned data structure like an `IMap`, the returned value will not be null, but otherwise undefined.
      Specified by:
        `getPartitionKey` in interface `DistributedObject`
      Returns:
        the partition key.

    - #### destroy

          public final void destroy()

      Description copied from interface: `DistributedObject`
      Destroys this object cluster-wide. Clears and releases all resources for this object.
      Specified by:
        `destroy` in interface `DistributedObject`

Copyright © 2018. All rights reserved.