public class ClientTxnMapProxy<K,V> extends Object implements TransactionalMap<K,V>
Constructor and Description |
---|
ClientTxnMapProxy(String name,
TransactionContextProxy proxy) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key)
Transactional implementation of
IMap.containsKey(Object) . |
void |
delete(Object key)
Transactional implementation of
IMap.delete(Object) . |
void |
destroy()
Destroys this object cluster-wide.
|
V |
get(Object key)
Transactional implementation of
IMap.get(Object) . |
V |
getForUpdate(Object key)
Locks the key and then gets and returns the value to which the specified key is mapped.
|
Object |
getId()
Returns the unique id for this object.
|
String |
getName()
Returns the unique name for this DistributedObject.
|
String |
getPartitionKey()
Returns the key of partition this DistributedObject is assigned to.
|
String |
getServiceName()
Returns the service name for this object.
|
boolean |
isEmpty()
Transactional implementation of
Map.isEmpty() . |
Set<K> |
keySet()
Transactional implementation of
IMap.keySet() . |
Set<K> |
keySet(Predicate predicate)
Transactional implementation of
IMap.keySet(com.hazelcast.query.Predicate) . |
V |
put(K key,
V value)
Transactional implementation of
IMap.put(Object, Object) . |
V |
put(K key,
V value,
long ttl,
TimeUnit timeunit)
Transactional implementation of
IMap.put(Object, Object, long, java.util.concurrent.TimeUnit) . |
V |
putIfAbsent(K key,
V value)
Transactional implementation of
IMap.putIfAbsent(Object, Object) . |
V |
remove(Object key)
Transactional implementation of
IMap.remove(Object) . |
boolean |
remove(Object key,
Object value)
Transactional implementation of
IMap.remove(Object, Object) . |
V |
replace(K key,
V value)
Transactional implementation of
IMap.replace(Object, Object) . |
boolean |
replace(K key,
V oldValue,
V newValue)
Transactional implementation of
IMap.replace(Object, Object, Object) . |
void |
set(K key,
V value)
Transactional implementation of
IMap.set(Object, Object) . |
int |
size()
Transactional implementation of
Map.size() . |
Collection<V> |
values()
Transactional implementation of
IMap.values() . |
Collection<V> |
values(Predicate predicate)
Transactional implementation of
IMap.values(com.hazelcast.query.Predicate) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, getId, getPartitionKey
public ClientTxnMapProxy(String name, TransactionContextProxy proxy)
public boolean containsKey(Object key)
TransactionalMap
IMap.containsKey(Object)
.containsKey
in interface BaseMap<K,V>
containsKey
in interface TransactionalMap<K,V>
key
- keytrue
if this map contains an entry for the specified keyIMap.containsKey(Object)
public V get(Object key)
TransactionalMap
IMap.get(Object)
.get
in interface BaseMap<K,V>
get
in interface TransactionalMap<K,V>
key
- keyIMap.get(Object)
public V getForUpdate(Object key)
TransactionalMap
getForUpdate
in interface TransactionalMap<K,V>
IMap.get(Object)
public int size()
TransactionalMap
Map.size()
.size
in interface BaseMap<K,V>
size
in interface TransactionalMap<K,V>
Map.size()
public boolean isEmpty()
TransactionalMap
Map.isEmpty()
.isEmpty
in interface BaseMap<K,V>
isEmpty
in interface TransactionalMap<K,V>
Map.isEmpty()
public V put(K key, V value)
TransactionalMap
IMap.put(Object, Object)
.
The object to be put will be accessible only in the current transaction context till transaction is committed.put
in interface BaseMap<K,V>
put
in interface TransactionalMap<K,V>
key
- keyvalue
- valuekey
or null
if there was no mapping for key
.IMap.put(Object, Object)
public V put(K key, V value, long ttl, TimeUnit timeunit)
TransactionalMap
IMap.put(Object, Object, long, java.util.concurrent.TimeUnit)
.
The object to be put will be accessible only in the current transaction context till transaction is committed.put
in interface TransactionalMap<K,V>
IMap.put(Object, Object, long, java.util.concurrent.TimeUnit)
public void set(K key, V value)
TransactionalMap
IMap.set(Object, Object)
.
The object to be set will be accessible only in the current transaction context till transaction is committed.set
in interface BaseMap<K,V>
set
in interface TransactionalMap<K,V>
key
- keyvalue
- valueIMap.set(Object, Object)
public V putIfAbsent(K key, V value)
TransactionalMap
IMap.putIfAbsent(Object, Object)
.
The object to be put will be accessible only in the current transaction context till transaction is committed.putIfAbsent
in interface BaseMap<K,V>
putIfAbsent
in interface TransactionalMap<K,V>
key
- keyvalue
- valuekey
or null
if there was no mapping for key
.IMap.putIfAbsent(Object, Object)
public V replace(K key, V value)
TransactionalMap
IMap.replace(Object, Object)
.
The object to be replaced will be accessible only in the current transaction context till transaction is committed.replace
in interface BaseMap<K,V>
replace
in interface TransactionalMap<K,V>
key
- keyvalue
- valuekey
or null
if there was no mapping for key
.IMap.replace(Object, Object)
public boolean replace(K key, V oldValue, V newValue)
TransactionalMap
IMap.replace(Object, Object, Object)
.
The object to be replaced will be accessible only in the current transaction context till transaction is committed.replace
in interface BaseMap<K,V>
replace
in interface TransactionalMap<K,V>
key
- keyoldValue
- old valuenewValue
- new valuetrue
if the value was replacedIMap.replace(Object, Object, Object)
public V remove(Object key)
TransactionalMap
IMap.remove(Object)
.
The object to be removed will be removed from only the current transaction context till transaction is committed.remove
in interface BaseMap<K,V>
remove
in interface TransactionalMap<K,V>
key
- keykey
or null
if there was no mapping for key
.IMap.remove(Object)
public void delete(Object key)
TransactionalMap
IMap.delete(Object)
.
The object to be deleted will be removed from only the current transaction context till transaction is committed.delete
in interface BaseMap<K,V>
delete
in interface TransactionalMap<K,V>
key
- keyIMap.delete(Object)
public boolean remove(Object key, Object value)
TransactionalMap
IMap.remove(Object, Object)
.
The object to be removed will be removed from only the current transaction context till transaction is committed.remove
in interface BaseMap<K,V>
remove
in interface TransactionalMap<K,V>
key
- keyvalue
- valuetrue
if the value was removedIMap.remove(Object, Object)
public Set<K> keySet()
TransactionalMap
IMap.keySet()
.
keySet
in interface TransactionalMap<K,V>
IMap.keySet()
public Set<K> keySet(Predicate predicate)
TransactionalMap
IMap.keySet(com.hazelcast.query.Predicate)
.
keySet
in interface TransactionalMap<K,V>
IMap.keySet(com.hazelcast.query.Predicate)
public Collection<V> values()
TransactionalMap
IMap.values()
.
values
in interface TransactionalMap<K,V>
IMap.values()
public Collection<V> values(Predicate predicate)
TransactionalMap
IMap.values(com.hazelcast.query.Predicate)
.
values
in interface TransactionalMap<K,V>
IMap.values(com.hazelcast.query.Predicate)
public String getName()
DistributedObject
getName
in interface DistributedObject
public String getServiceName()
DistributedObject
getServiceName
in interface DistributedObject
public final void destroy()
DistributedObject
destroy
in interface DistributedObject
public Object getId()
DistributedObject
getId
in interface DistributedObject
public String getPartitionKey()
DistributedObject
getPartitionKey
in interface DistributedObject
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.