public class ClientTxnMultiMapProxy<K,V> extends Object implements TransactionalMultiMap<K,V>
| Constructor and Description |
|---|
ClientTxnMultiMapProxy(String name,
ClientTransactionContext transactionContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys this object cluster-wide.
|
Collection<V> |
get(K key)
Returns the collection of values associated with the key.
|
Object |
getId()
Returns the unique id for this object.
|
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.
|
protected String |
getTransactionId() |
boolean |
put(K key,
V value)
Stores a key-value pair in the multimap.
|
Collection<V> |
remove(Object key)
Removes all the entries associated with the given key.
|
boolean |
remove(Object key,
Object value)
Removes the given key value pair from the multimap.
|
int |
size()
Returns the number of key-value pairs in the multimap.
|
int |
valueCount(K key)
Returns the number of values matching the given key in the multimap.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, getId, getPartitionKeypublic ClientTxnMultiMapProxy(String name, ClientTransactionContext transactionContext)
public boolean put(K key, V value) throws TransactionException
TransactionalMultiMapput in interface BaseMultiMap<K,V>put in interface TransactionalMultiMap<K,V>key - the key to be storedvalue - the value to be storedTransactionExceptionpublic Collection<V> get(K key)
TransactionalMultiMapget in interface BaseMultiMap<K,V>get in interface TransactionalMultiMap<K,V>key - the key whose associated values are returnedpublic boolean remove(Object key, Object value)
TransactionalMultiMapremove in interface BaseMultiMap<K,V>remove in interface TransactionalMultiMap<K,V>key - the key of the entry to removevalue - the value of the entry to removepublic Collection<V> remove(Object key)
TransactionalMultiMapremove in interface BaseMultiMap<K,V>remove in interface TransactionalMultiMap<K,V>key - the key of the entries to removepublic int valueCount(K key)
TransactionalMultiMapvalueCount in interface BaseMultiMap<K,V>valueCount in interface TransactionalMultiMap<K,V>key - the key whose number of values is to be returnedpublic int size()
TransactionalMultiMapsize in interface BaseMultiMap<K,V>size in interface TransactionalMultiMap<K,V>public String getName()
DistributedObjectgetName in interface DistributedObjectpublic String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectprotected String getTransactionId()
public final void destroy()
DistributedObjectdestroy in interface DistributedObjectpublic Object getId()
DistributedObjectgetId in interface DistributedObjectpublic String getPartitionKey()
DistributedObjectIAtomicLong. For a partitioned data structure like an IMap,
the returned value will not be null, but otherwise undefined.getPartitionKey in interface DistributedObjectCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.