public class TransactionalMapProxy extends TransactionalMapProxySupport implements TransactionalMap
TransactionalMap
interface.mapNearCacheManager, mapServiceContext, name, operationProvider, operationService, partitionService, partitionStrategy, ss, valueMap
tx
PARTITIONING_STRATEGY
Constructor and Description |
---|
TransactionalMapProxy(String name,
MapService mapService,
NodeEngine nodeEngine,
Transaction transaction) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key)
Transactional implementation of
IMap.containsKey(Object) . |
boolean |
containsKey(Object key,
boolean skipNearCacheLookup) |
void |
delete(Object key)
Transactional implementation of
IMap.delete(Object) . |
Object |
get(Object key)
Transactional implementation of
IMap.get(Object) . |
Object |
get(Object key,
boolean skipNearCacheLookup) |
Object |
getForUpdate(Object key)
Locks the key and then gets and returns the value to which the specified
key is mapped.
|
boolean |
isEmpty()
Transactional implementation of
Map.isEmpty() . |
Set<Object> |
keySet()
Transactional implementation of
IMap.keySet() . |
Set |
keySet(Predicate predicate)
Transactional implementation of
IMap.keySet(com.hazelcast.query.Predicate) . |
Object |
put(Object key,
Object value)
Transactional implementation of
IMap.put(Object, Object) . |
Object |
put(Object key,
Object value,
long ttl,
TimeUnit timeUnit)
Transactional implementation of
IMap.put(Object, Object, long, TimeUnit) . |
Object |
putIfAbsent(Object key,
Object value)
Transactional implementation of
IMap.putIfAbsent(Object, Object) . |
Object |
remove(Object key)
Transactional implementation of
IMap.remove(Object) . |
boolean |
remove(Object key,
Object value)
Transactional implementation of
IMap.remove(Object, Object) . |
Object |
replace(Object key,
Object value)
Transactional implementation of
IMap.replace(Object, Object) . |
boolean |
replace(Object key,
Object oldValue,
Object newValue)
Transactional implementation of
IMap.replace(Object, Object, Object) . |
void |
set(Object key,
Object value)
Transactional implementation of
IMap.set(Object, Object) . |
int |
size()
Transactional implementation of
Map.size() . |
String |
toString() |
Collection<Object> |
values()
Transactional implementation of
IMap.values() . |
Collection |
values(Predicate predicate)
Transactional implementation of
IMap.values(com.hazelcast.query.Predicate) . |
getName, getServiceName
toObjectIfNeeded
destroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, isClusterVersionEqualTo, isClusterVersionGreaterOrEqual, isClusterVersionGreaterThan, isClusterVersionLessOrEqual, isClusterVersionLessThan, isClusterVersionUnknown, isClusterVersionUnknownOrGreaterOrEqual, isClusterVersionUnknownOrGreaterThan, isClusterVersionUnknownOrLessOrEqual, isClusterVersionUnknownOrLessThan, postDestroy, preDestroy, throwNotActiveException, toData
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
destroy, getName, getPartitionKey, getServiceName
public TransactionalMapProxy(String name, MapService mapService, NodeEngine nodeEngine, Transaction transaction)
public boolean containsKey(Object key)
TransactionalMap
IMap.containsKey(Object)
.containsKey
in interface BaseMap
containsKey
in interface TransactionalMap
key
- The specified key.true
if this map contains an entry for the specified key.IMap.containsKey(Object)
public boolean containsKey(Object key, boolean skipNearCacheLookup)
public int size()
TransactionalMap
Map.size()
.size
in interface BaseMap
size
in interface TransactionalMap
Map.size()
public boolean isEmpty()
TransactionalMap
Map.isEmpty()
.isEmpty
in interface BaseMap
isEmpty
in interface TransactionalMap
Map.isEmpty()
public Object get(Object key)
TransactionalMap
IMap.get(Object)
.get
in interface BaseMap
get
in interface TransactionalMap
key
- The specified key.IMap.get(Object)
public Object getForUpdate(Object key)
TransactionalMap
getForUpdate
in interface TransactionalMap
IMap.get(Object)
public Object put(Object key, Object 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
put
in interface TransactionalMap
key
- The specified key.value
- The value to associate with the key.key
or null
if there was no mapping for key
.IMap.put(Object, Object)
public Object put(Object key, Object value, long ttl, TimeUnit timeUnit)
TransactionalMap
IMap.put(Object, Object, long, TimeUnit)
.
The object to be put will be accessible only in the current transaction context till transaction is committed.
put
in interface BaseMap
put
in interface TransactionalMap
key
- The specified key.value
- The value to associate with the key.ttl
- maximum time for this entry to stay in the map
0 means infinite.timeUnit
- time unit for the ttlkey
or null
if there was no mapping for key
.IMap.put(Object, Object, long, TimeUnit)
public void set(Object key, Object 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
set
in interface TransactionalMap
key
- The specified key.value
- The value to associate with the key.IMap.set(Object, Object)
public Object putIfAbsent(Object key, Object value)
TransactionalMap
IMap.putIfAbsent(Object, Object)
.
The object to be put will be accessible only in the current transaction context until the transaction is committed.
putIfAbsent
in interface BaseMap
putIfAbsent
in interface TransactionalMap
key
- The specified key.value
- The value to associate with the key when there is no previous value.key
, or null
if there was no mapping for key
.IMap.putIfAbsent(Object, Object)
public Object replace(Object key, Object value)
TransactionalMap
IMap.replace(Object, Object)
.
The object to be replaced will be accessible only in the current transaction context until the transaction is committed.
replace
in interface BaseMap
replace
in interface TransactionalMap
key
- The specified key.value
- The value to replace the previous value.key
, or null
if there was no mapping for key
.IMap.replace(Object, Object)
public boolean replace(Object key, Object oldValue, Object newValue)
TransactionalMap
IMap.replace(Object, Object, Object)
.
The object to be replaced will be accessible only in the current transaction context until the transaction is committed.
replace
in interface BaseMap
replace
in interface TransactionalMap
key
- The specified key.oldValue
- Replace the key value if it is the old value.newValue
- The new value to replace the old value.true
if the value was replaced.IMap.replace(Object, Object, 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 until the transaction is committed.
remove
in interface BaseMap
remove
in interface TransactionalMap
key
- The specified key.value
- Remove the key if it has this value.true
if the value was removed.IMap.remove(Object, Object)
public Object remove(Object key)
TransactionalMap
IMap.remove(Object)
.
The object to be removed will be removed from only the current transaction context until the transaction is committed.
remove
in interface BaseMap
remove
in interface TransactionalMap
key
- Remove the mapping for this key.key
, 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 until the transaction is committed.
delete
in interface BaseMap
delete
in interface TransactionalMap
key
- Remove the mapping for this key.IMap.delete(Object)
public Set<Object> keySet()
TransactionalMap
IMap.keySet()
.keySet
in interface BaseMap
keySet
in interface TransactionalMap
IMap.keySet()
public Set keySet(Predicate predicate)
TransactionalMap
IMap.keySet(com.hazelcast.query.Predicate)
.keySet
in interface BaseMap
keySet
in interface TransactionalMap
predicate
- specified query criteria.IMap.keySet(com.hazelcast.query.Predicate)
public Collection<Object> values()
TransactionalMap
IMap.values()
.values
in interface BaseMap
values
in interface TransactionalMap
IMap.values()
public Collection values(Predicate predicate)
TransactionalMap
IMap.values(com.hazelcast.query.Predicate)
.values
in interface BaseMap
values
in interface TransactionalMap
predicate
- specified query criteria.IMap.values(com.hazelcast.query.Predicate)
public String toString()
toString
in class AbstractDistributedObject<MapService>
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.