org.springframework.batch.item.data

## Class GemfireItemWriter<K,V>

- java.lang.Object
- - org.springframework.batch.item.KeyValueItemWriter<K,V>
  - - org.springframework.batch.item.data.GemfireItemWriter<K,V>

- All Implemented Interfaces:
    ItemWriter<V>, org.springframework.beans.factory.InitializingBean
  Direct Known Subclasses:
    SpELMappingGemfireItemWriter

      public class GemfireItemWriter<K,V>
      extends KeyValueItemWriter<K,V>

  An `ItemWriter` that stores items in GemFire
  Since:
    2.2
  Author:
    David Turanski

- - ### Field Summary

    - ### Fields inherited from class org.springframework.batch.item.KeyValueItemWriter

      `delete, itemKeyMapper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GemfireItemWriter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `init()` afterPropertiesSet() hook
    `void` | `setTemplate(org.springframework.data.gemfire.GemfireTemplate gemfireTemplate)`
    `protected void` | `writeKeyValue(K key, V value)` Subclasses implement this method to write each item to key value store

    - ### Methods inherited from class org.springframework.batch.item.KeyValueItemWriter

      `afterPropertiesSet, flush, setDelete, setItemKeyMapper, write`

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

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

- - ### Constructor Detail

    - #### GemfireItemWriter

          public GemfireItemWriter()

  - ### Method Detail

    - #### setTemplate

          public void setTemplate(org.springframework.data.gemfire.GemfireTemplate gemfireTemplate)

      Parameters:
        `gemfireTemplate` - the `GemfireTemplate` to set

    - #### writeKeyValue

          protected void writeKeyValue(K key,
                                       V value)

      Description copied from class: `KeyValueItemWriter`
      Subclasses implement this method to write each item to key value store
      Specified by:
        `writeKeyValue` in class `KeyValueItemWriter<K,V>`
      Parameters:
        `key` - the key
        `value` - the item

    - #### init

          protected void init()

      Description copied from class: `KeyValueItemWriter`
      afterPropertiesSet() hook
      Specified by:
        `init` in class `KeyValueItemWriter<K,V>`