org.apache.storm.redis.bolt

## Class RedisStoreBolt

- java.lang.Object
- - org.apache.storm.topology.base.BaseComponent
  - - org.apache.storm.topology.base.BaseRichBolt
    - - org.apache.storm.topology.base.BaseTickTupleAwareRichBolt
      - - org.apache.storm.redis.bolt.AbstractRedisBolt
        - - org.apache.storm.redis.bolt.RedisStoreBolt

- All Implemented Interfaces:
    Serializable, IBolt, IComponent, IRichBolt

      public class RedisStoreBolt
      extends AbstractRedisBolt

  Basic bolt for writing to Redis.

  Various data types are supported: STRING, LIST, HASH, SET, SORTED_SET, HYPER_LOG_LOG, GEO

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.apache.storm.redis.bolt.AbstractRedisBolt

      `collector`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RedisStoreBolt(JedisClusterConfig config, RedisStoreMapper storeMapper)` Constructor for Redis Cluster environment (JedisCluster).
    `RedisStoreBolt(JedisPoolConfig config, RedisStoreMapper storeMapper)` Constructor for single Redis environment (JedisPool).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `declareOutputFields(OutputFieldsDeclarer declarer)` Declare the output schema for all the streams of this topology.
    `void` | `process(Tuple input)` Process a single non-tick tuple of input.

    - ### Methods inherited from class org.apache.storm.redis.bolt.AbstractRedisBolt

      `cleanup, getInstance, prepare, returnInstance`

    - ### Methods inherited from class org.apache.storm.topology.base.BaseTickTupleAwareRichBolt

      `execute, onTickTuple`

    - ### Methods inherited from class org.apache.storm.topology.base.BaseComponent

      `getComponentConfiguration`

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

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

    - ### Methods inherited from interface org.apache.storm.topology.IComponent

      `getComponentConfiguration`

- - ### Constructor Detail

    - #### RedisStoreBolt

          public RedisStoreBolt(JedisPoolConfig config,
                                RedisStoreMapper storeMapper)

      Constructor for single Redis environment (JedisPool).

      Parameters:
        `config` - configuration for initializing JedisPool
        `storeMapper` - mapper containing which datatype, storing value’s key that Bolt uses

    - #### RedisStoreBolt

          public RedisStoreBolt(JedisClusterConfig config,
                                RedisStoreMapper storeMapper)

      Constructor for Redis Cluster environment (JedisCluster).

      Parameters:
        `config` - configuration for initializing JedisCluster
        `storeMapper` - mapper containing which datatype, storing value’s key that Bolt uses

  - ### Method Detail

    - #### process

          public void process(Tuple input)

      Process a single non-tick tuple of input. Implementation needs to handle ack manually. More details on `IBolt.execute(Tuple)`.

      Specified by:
        `process` in class `BaseTickTupleAwareRichBolt`
      Parameters:
        `input` - The input tuple to be processed.

    - #### declareOutputFields

          public void declareOutputFields(OutputFieldsDeclarer declarer)

      Declare the output schema for all the streams of this topology.

      Parameters:
        `declarer` - this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream

Copyright © 2021 The Apache Software Foundation. All rights reserved.