com.hazelcast.client.txn.proxy
Class ClientTxnSetProxy<E>

java.lang.Object
  extended by com.hazelcast.client.txn.proxy.AbstractClientTxnCollectionProxy<E>
      extended by com.hazelcast.client.txn.proxy.ClientTxnSetProxy<E>
All Implemented Interfaces:
DistributedObject, TransactionalSet<E>, TransactionalObject

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

Author:
ali 6/11/13

Constructor Summary
ClientTxnSetProxy(String name, TransactionContextProxy proxy)
           
 
Method Summary
 boolean add(E e)
          Add new item to transactional set.
 void destroy()
          Destroys this object cluster-wide.
 Object getId()
          Returns the unique id for this object.
 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 com.hazelcast.client.txn.proxy.AbstractClientTxnCollectionProxy
getName, throwExceptionIfNull
 
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, getId, getName, getPartitionKey
 

Constructor Detail

ClientTxnSetProxy

public ClientTxnSetProxy(String name,
                         TransactionContextProxy proxy)
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.

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

getId

public Object getId()
Description copied from interface: DistributedObject
Returns the unique id for this object.

Specified by:
getId in interface DistributedObject
Returns:
id the of this instance

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.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.