org.apache.geode.experimental.driver

## Class ProtobufRegion<K,V>

- java.lang.Object
- - org.apache.geode.experimental.driver.ProtobufRegion<K,V>

- Type Parameters:
    `K` - Type of region keys.
    `V` - Type of region values.
  All Implemented Interfaces:
    Region<K,V>

      @Experimental
      public class ProtobufRegion<K,V>
      extends java.lang.Object
      implements Region<K,V>

  Implements the behaviors of a GemFire region. Send and receives Protobuf messages on the provided socket to communicate with a GemFire server that has Protobuf enabled. This code is an experimental prototype and is presented "as is" with no warranty, suitability, or fitness of purpose implied.

- - ### Method Summary

    All Methods Instance Methods Concrete 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### size

          public int size()
                   throws java.io.IOException

      Description copied from interface: `Region`
      Gets the number of entries in this region.
      Specified by:
        `size` in interface `Region<K,V>`
      Returns:
        Non-negative integer count.
      Throws:
        `java.io.IOException`

    - #### get

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

      Description copied from interface: `Region`
      Gets the value, if any, contained in this region for the `key`.
      Specified by:
        `get` in interface `Region<K,V>`
      Parameters:
        `key` - Unique key associated with a value.
      Returns:
        Value, if any, associated with `key`.
      Throws:
        `java.io.IOException`

    - #### getAll

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

      Description copied from interface: `Region`
      Gets the values, if any, contained in this region for the collection of `keys`.
      Specified by:
        `getAll` in interface `Region<K,V>`
      Parameters:
        `keys` - Collection of unique keys associated with values.
      Returns:
        Map from `keys` to their associated values.
      Throws:
        `java.io.IOException`

    - #### put

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

      Description copied from interface: `Region`
      Puts the `value` into this region for the `key`.
      Specified by:
        `put` in interface `Region<K,V>`
      Parameters:
        `key` - Unique key to associate with the `value`.
        `value` - Value to associate with the `key`.
      Throws:
        `java.io.IOException`

    - #### putAll

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

      Description copied from interface: `Region`
      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.
      Specified by:
        `putAll` in interface `Region<K,V>`
      Parameters:
        `values` - Map from `keys` to their associated values.
      Throws:
        `java.io.IOException`

    - #### clear

          public void clear()
                     throws java.io.IOException

      Description copied from interface: `Region`
      Removes all keys and values associated from this region.
      Specified by:
        `clear` in interface `Region<K,V>`
      Throws:
        `java.io.IOException`

    - #### putIfAbsent

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

      Description copied from interface: `Region`
      Puts the `value` into this region for the `key` if `key` does not already have a value associated with it.
      Specified by:
        `putIfAbsent` in interface `Region<K,V>`
      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

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

      Description copied from interface: `Region`
      Removes any value associated with the `key` from this region.
      Specified by:
        `remove` in interface `Region<K,V>`
      Parameters:
        `key` - Unique key associated with a value.
      Throws:
        `java.io.IOException`

    - #### keySet

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

      Description copied from interface: `Region`
      Gets all the keys for which this region has entries
      Specified by:
        `keySet` in interface `Region<K,V>`
      Returns:
        Set of keys in this region
      Throws:
        `java.io.IOException`