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.
|
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, wait
destroy, getName, getPartitionKey
public ClientTxnMultiMapProxy(String name, ClientTransactionContext transactionContext)
public boolean put(K key, V value) throws TransactionException
TransactionalMultiMap
put
in interface BaseMultiMap<K,V>
put
in interface TransactionalMultiMap<K,V>
key
- the key to be storedvalue
- the value to be storedTransactionException
public Collection<V> get(K key)
TransactionalMultiMap
get
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)
TransactionalMultiMap
remove
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)
TransactionalMultiMap
remove
in interface BaseMultiMap<K,V>
remove
in interface TransactionalMultiMap<K,V>
key
- the key of the entries to removepublic int valueCount(K key)
TransactionalMultiMap
valueCount
in interface BaseMultiMap<K,V>
valueCount
in interface TransactionalMultiMap<K,V>
key
- the key whose number of values is to be returnedpublic int size()
TransactionalMultiMap
size
in interface BaseMultiMap<K,V>
size
in interface TransactionalMultiMap<K,V>
public String getServiceName()
DistributedObject
getServiceName
in interface DistributedObject
protected String getTransactionId()
public final void destroy()
DistributedObject
destroy
in interface DistributedObject
public String getName()
DistributedObject
getName
in interface DistributedObject
public String getPartitionKey()
DistributedObject
IAtomicLong
. For a partitioned data structure like an IMap
,
the returned value will not be null, but otherwise undefined.getPartitionKey
in interface DistributedObject
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.