|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - KeyV - Valuepublic interface BaseMap<K,V>
Base interface for Hazelcast distributed maps.
IMap,
TransactionalMap| Method Summary | |
|---|---|
boolean |
containsKey(Object key)
Returns true if this map contains an entry for the specified
key. |
void |
delete(Object key)
Removes the mapping for a key from this map if it is present. |
V |
get(Object key)
Returns the value for the specified key, or null if this map does not contain this key. |
boolean |
isEmpty()
Returns true if this map contains no entries. |
V |
put(K key,
V value)
Associates the specified value with the specified key in this map If the map previously contained a mapping for the key, the old value is replaced by the specified value. |
V |
putIfAbsent(K key,
V value)
If the specified key is not already associated with a value, associate it with the given value. |
V |
remove(Object key)
Removes the mapping for a key from this map if it is present. |
boolean |
remove(Object key,
Object value)
Removes the entry for a key only if currently mapped to a given value. |
V |
replace(K key,
V value)
Replaces the entry for a key only if currently mapped to some value. |
boolean |
replace(K key,
V oldValue,
V newValue)
Replaces the entry for a key only if currently mapped to a given value. |
void |
set(K key,
V value)
Associates the specified value with the specified key in this map If the map previously contained a mapping for the key, the old value is replaced by the specified value. |
int |
size()
Returns the number of entries in this map. |
| Methods inherited from interface com.hazelcast.core.DistributedObject |
|---|
destroy, getId, getName, getPartitionKey, getServiceName |
| Method Detail |
|---|
boolean containsKey(Object key)
true if this map contains an entry for the specified
key.
key - key
true if this map contains an entry for the specified keyV get(Object key)
null if this map does not contain this key.
key - key
V put(K key,
V value)
key - keyvalue - value
key or null
if there was no mapping for key.
void set(K key,
V value)
put(Object, Object)
if the old value is not needed.
key - keyvalue - value
V putIfAbsent(K key,
V value)
if (!map.containsKey(key))
return map.put(key, value);
else
return map.get(key);
except that the action is performed atomically.
key - keyvalue - value
key or null
if there was no mapping for key.
V replace(K key,
V value)
if (map.containsKey(key)) {
return map.put(key, value);
} else return null;
except that the action is performed atomically.
key - keyvalue - value
key or null
if there was no mapping for key.
boolean replace(K key,
V oldValue,
V newValue)
if (map.containsKey(key) && map.get(key).equals(oldValue)) {
map.put(key, newValue);
return true;
} else return false;
except that the action is performed atomically.
key - keyoldValue - old valuenewValue - new value
true if the value was replacedV remove(Object key)
The map will not contain a mapping for the specified key once the call returns.
key - key
key or null
if there was no mapping for key.void delete(Object key)
The map will not contain a mapping for the specified key once the call returns. *
This method is preferred to remove(Object)
if the old value is not needed.
key - key
boolean remove(Object key,
Object value)
if (map.containsKey(key) && map.get(key).equals(value)) {
map.remove(key);
return true;
} else return false;
except that the action is performed atomically.
key - keyvalue - value
true if the value was removedboolean isEmpty()
int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||