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
    --- | ---
    `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`.
    `RegionAttributes` | `getRegionAttributes()` Captures a snapshot of the attributes (e.g., size) of this region.
    `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.
    `void` | `remove(K key)` Removes any value associated with the `key` from this region.

- - ### Method Detail

    - #### getRegionAttributes

          RegionAttributes getRegionAttributes()
                                        throws java.io.IOException

      Captures a snapshot of the attributes (e.g., size) of this region.
      Returns:
        Attributes associated with this region.
      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`

    - #### 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`