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

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

public class ClientTxnListProxy<E>
extends AbstractClientTxnCollectionProxy<E>
implements TransactionalList<E>

Author:
ali 6/11/13

Constructor Summary
ClientTxnListProxy(String name, TransactionContextProxy proxy)
           
 
Method Summary
 boolean add(E e)
          Adds a new item to the transactional list.
 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 the transactional list
 int size()
          Returns the size of the list
 
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

ClientTxnListProxy

public ClientTxnListProxy(String name,
                          TransactionContextProxy proxy)
Method Detail

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.

add

public boolean add(E e)
Description copied from interface: TransactionalList
Adds a new item to the transactional list.

Specified by:
add in interface TransactionalList<E>
Parameters:
e - the new item added to the transactional list
Returns:
true if the item is added successfully, false otherwise

remove

public boolean remove(E e)
Description copied from interface: TransactionalList
Remove item from the transactional list

Specified by:
remove in interface TransactionalList<E>
Parameters:
e - item to remove the transactional list
Returns:
true if the item is removed successfully, false otherwise

size

public int size()
Description copied from interface: TransactionalList
Returns the size of the list

Specified by:
size in interface TransactionalList<E>
Returns:
the size of the list

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.