public interface TransactionalMapCodecTemplate
Modifier and Type | Method and Description |
---|---|
Object |
containsKey(String name,
String txnId,
long threadId,
Data key)
Returns true if this map contains an entry for the specified key.
|
void |
delete(String name,
String txnId,
long threadId,
Data key)
Removes the mapping for a key from this map if it is present.
|
Object |
get(String name,
String txnId,
long threadId,
Data key)
Returns the value for the specified key, or null if this map does not contain this key.
|
Object |
getForUpdate(String name,
String txnId,
long threadId,
Data key)
Locks the key and then gets and returns the value to which the specified key is mapped.
|
Object |
isEmpty(String name,
String txnId,
long threadId)
Returns true if this map contains no entries.
|
Object |
keySet(String name,
String txnId,
long threadId)
Returns a set clone of the keys contained in this map.
|
Object |
keySetWithPredicate(String name,
String txnId,
long threadId,
Data predicate)
Queries the map based on the specified predicate and returns the keys of matching entries.
|
Object |
put(String name,
String txnId,
long threadId,
Data key,
Data value,
long ttl)
Associates the specified value with the specified key in this map.
|
Object |
putIfAbsent(String name,
String txnId,
long threadId,
Data key,
Data value)
If the specified key is not already associated with a value, associate it with the given value.
|
Object |
remove(String name,
String txnId,
long threadId,
Data key)
Removes the mapping for a key from this map if it is present.
|
Object |
removeIfSame(String name,
String txnId,
long threadId,
Data key,
Data value)
Removes the entry for a key only if currently mapped to a given value.
|
Object |
replace(String name,
String txnId,
long threadId,
Data key,
Data value)
Replaces the entry for a key only if it is currently mapped to some value.
|
Object |
replaceIfSame(String name,
String txnId,
long threadId,
Data key,
Data oldValue,
Data newValue)
Replaces the entry for a key only if currently mapped to a given value.
|
void |
set(String name,
String txnId,
long threadId,
Data key,
Data value)
Associates the specified value with the specified key in this map.
|
Object |
size(String name,
String txnId,
long threadId)
Returns the number of entries in this map.
|
Object |
values(String name,
String txnId,
long threadId)
Returns a collection clone of the values contained in this map.
|
Object |
valuesWithPredicate(String name,
String txnId,
long threadId,
Data predicate)
Queries the map based on the specified predicate and returns the values of matching entries.Specified predicate
runs on all members in parallel.
|
Object containsKey(String name, String txnId, long threadId, Data key)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified key.Object get(String name, String txnId, long threadId, Data key)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified keyObject getForUpdate(String name, String txnId, long threadId, Data key)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The value to which the specified key is mappedObject size(String name, String txnId, long threadId)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.Object isEmpty(String name, String txnId, long threadId)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.Object put(String name, String txnId, long threadId, Data key, Data value, long ttl)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified keyvalue
- The value to associate with the key.ttl
- The duration in milliseconds after which this entry shall be deleted. O means infinite.void set(String name, String txnId, long threadId, Data key, Data value)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified keyvalue
- The value to associate with keyObject putIfAbsent(String name, String txnId, long threadId, Data key, Data value)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified keyvalue
- The value to associate with the key when there is no previous value.Object replace(String name, String txnId, long threadId, Data key, Data value)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified keyvalue
- The value replaced the previous valueObject replaceIfSame(String name, String txnId, long threadId, Data key, Data oldValue, Data newValue)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified key.oldValue
- Replace the key value if it is the old value.newValue
- The new value to replace the old value.Object remove(String name, String txnId, long threadId, Data key)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- Remove the mapping for this key.void delete(String name, String txnId, long threadId, Data key)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- Remove the mapping for this key.Object removeIfSame(String name, String txnId, long threadId, Data key, Data value)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.key
- The specified keyvalue
- Remove the key if it has this value.Object keySet(String name, String txnId, long threadId)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.GroupProperty.QUERY_RESULT_SIZE_LIMIT
Object keySetWithPredicate(String name, String txnId, long threadId, Data predicate)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.predicate
- Specified query criteria.GroupProperty.QUERY_RESULT_SIZE_LIMIT
Object values(String name, String txnId, long threadId)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.GroupProperty.QUERY_RESULT_SIZE_LIMIT
Object valuesWithPredicate(String name, String txnId, long threadId, Data predicate)
name
- Name of the Transactional MaptxnId
- ID of the this transaction operationthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.predicate
- Specified query criteria.GroupProperty.QUERY_RESULT_SIZE_LIMIT
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.