K - Type of region keys.V - Type of region values.@Experimental public class ProtobufRegion<K,V> extends Object implements Region<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all keys and values associated from this region.
|
V |
get(K key)
Gets the value, if any, contained in this region for the
key. |
Map<K,V> |
getAll(Collection<K> keys)
Gets the values, if any, contained in this region for the collection of
keys. |
Set<K> |
keySet()
Gets all the keys for which this region has entries
|
void |
put(K key,
V value)
Puts the
value into this region for the key. |
void |
putAll(Map<K,V> values)
Puts the map from keys to
values into this region. |
V |
putIfAbsent(K key,
V value)
Puts the
value into this region for the key if key does
not already have a value associated with it. |
void |
remove(K key)
Removes any value associated with the
key from this region. |
int |
size()
Gets the number of entries in this region.
|
public int size()
throws IOException
Regionsize in interface Region<K,V>IOExceptionpublic V get(K key) throws IOException
Regionkey.get in interface Region<K,V>key - Unique key associated with a value.key.IOExceptionpublic Map<K,V> getAll(Collection<K> keys) throws IOException
Regionkeys.getAll in interface Region<K,V>keys - Collection of unique keys associated with values.keys to their associated values.IOExceptionpublic void put(K key, V value) throws IOException
Regionvalue into this region for the key.put in interface Region<K,V>key - Unique key to associate with the value.value - Value to associate with the key.IOExceptionpublic void putAll(Map<K,V> values) throws IOException
Regionvalues into this region. If any one key/value pair can
not be inserted, the remaining pair insertions will be attempted.putAll in interface Region<K,V>values - Map from keys to their associated values.IOExceptionpublic void clear()
throws IOException
Regionclear in interface Region<K,V>IOExceptionpublic V putIfAbsent(K key, V value) throws IOException
Regionvalue into this region for the key if key does
not already have a value associated with it.putIfAbsent in interface Region<K,V>IOExceptionpublic void remove(K key) throws IOException
Regionkey from this region.remove in interface Region<K,V>key - Unique key associated with a value.IOExceptionpublic Set<K> keySet() throws IOException
RegionkeySet in interface Region<K,V>IOException