com.hazelcast.multimap.impl.txn
public class TransactionalMultiMapProxy<K,V> extends TransactionalMultiMapProxySupport implements TransactionalMultiMap<K,V>
config, name, tx
PARTITIONING_STRATEGY
Constructor and Description |
---|
TransactionalMultiMapProxy(NodeEngine nodeEngine,
MultiMapService service,
String name,
TransactionSupport tx) |
Modifier and Type | Method and Description |
---|---|
Collection<V> |
get(K key)
Returns the collection of values associated with the key.
|
String |
getName()
Returns the unique name for this DistributedObject.
|
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.
|
String |
toString() |
int |
valueCount(K key)
Returns the number of values matching the given key in the multimap.
|
checkTransactionActive, getInternal, getServiceName, putInternal, removeAllInternal, removeInternal, size, valueCountInternal
destroy, equals, getId, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionKey, getService, hashCode, invalidate, postDestroy, throwNotActiveException
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
size
destroy, getId, getPartitionKey, getServiceName
public TransactionalMultiMapProxy(NodeEngine nodeEngine, MultiMapService service, String name, TransactionSupport tx)
public String getName()
DistributedObject
getName
in interface DistributedObject
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 String toString()
toString
in class AbstractDistributedObject<MultiMapService>
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.