Region (Apache Geode 1.6.0)
Date: 2018-04-23

org.apache.geode.experimental.driver

## Interface Region<K,V>

- Type Parameters:
    `K` - Type of region keys.
    `V` - Type of region values.
  All Known Implementing Classes:
    ProtobufRegion

      @Experimental
      public interface Region<K,V>

  Defines the behaviors of a GemFire region. A region is an associative array from unique keys to values. For each key, the region will contain zero or one value. This code is an experimental prototype and is presented "as is" with no warranty, suitability, or fitness of purpose implied.
  See Also:
    `JSONWrapper`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    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`.
    `java.util.Map<K,V>` | `getAll(java.util.Collection<K> keys)` Gets the values, if any, contained in this region for the collection of `keys`.
    `java.util.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(java.util.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.

- - ### Method Detail

    - #### size

          int size()
            throws java.io.IOException

      Gets the number of entries in this region.
      Returns:
        Non-negative integer count.
      Throws:
        `java.io.IOException`

    - #### get

          V get(K key)
          throws java.io.IOException

      Gets the value, if any, contained in this region for the `key`.
      Parameters:
        `key` - Unique key associated with a value.
      Returns:
        Value, if any, associated with `key`.
      Throws:
        `java.io.IOException`

    - #### getAll

          java.util.Map<K,V> getAll(java.util.Collection<K> keys)
                             throws java.io.IOException

      Gets the values, if any, contained in this region for the collection of `keys`.
      Parameters:
        `keys` - Collection of unique keys associated with values.
      Returns:
        Map from `keys` to their associated values.
      Throws:
        `java.io.IOException`

    - #### put

          void put(K key,
                   V value)
            throws java.io.IOException

      Puts the `value` into this region for the `key`.
      Parameters:
        `key` - Unique key to associate with the `value`.
        `value` - Value to associate with the `key`.
      Throws:
        `java.io.IOException`

    - #### putAll

          void putAll(java.util.Map<K,V> values)
               throws java.io.IOException

      Puts the map from keys to `values` into this region. If any one key/value pair can not be inserted, the remaining pair insertions will be attempted.
      Parameters:
        `values` - Map from `keys` to their associated values.
      Throws:
        `java.io.IOException`

    - #### clear

          void clear()
              throws java.io.IOException

      Removes all keys and values associated from this region.
      Throws:
        `java.io.IOException`

    - #### putIfAbsent

          V putIfAbsent(K key,
                        V value)
                 throws java.io.IOException

      Puts the `value` into this region for the `key` if `key` does not already have a value associated with it.
      Returns:
        null if the value was set; the current value otherwise. NOTE that if the value in the region was set to null, this method will return null without setting a new value.
      Throws:
        `java.io.IOException`

    - #### remove

          void remove(K key)
               throws java.io.IOException

      Removes any value associated with the `key` from this region.
      Parameters:
        `key` - Unique key associated with a value.
      Throws:
        `java.io.IOException`

    - #### keySet

          java.util.Set<K> keySet()
                           throws java.io.IOException

      Gets all the keys for which this region has entries
      Returns:
        Set of keys in this region
      Throws:
        `java.io.IOException`