Package org.apache.storm.redis.common.container

# Class JedisContainer

java.lang.Object
org.apache.storm.redis.common.container.JedisContainer

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `JedisCommandsContainer`

public class JedisContainer extends Object implements JedisCommandsContainer
Adapter for providing a unified interface for running commands over both Jedis and JedisCluster instances.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JedisContainer(redis.clients.jedis.JedisPool jedisPool)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Release Container.
  `Boolean`
  `exists(String key)`
  `Long`
  `geoadd(String key, double longitude, double latitude, String member)`
  `List<redis.clients.jedis.GeoCoordinate>`
  `geopos(String key, String... members)`
  `String`
  `get(String key)`
  `Boolean`
  `hexists(String key, String field)`
  `String`
  `hget(String key, String field)`
  `Long`
  `hset(String key, String field, String value)`
  `String`
  `lpop(String key)`
  `Long`
  `pfadd(String key, String... elements)`
  `long`
  `pfcount(String key)`
  `Long`
  `rpush(String key, String... string)`
  `Long`
  `sadd(String key, String... member)`
  `Long`
  `scard(String key)`
  `String`
  `set(String key, String value)`
  `Boolean`
  `sismember(String key, String member)`
  `Long`
  `zadd(String key, double score, String member)`
  `Long`
  `zrank(String key, String member)`
  `Double`
  `zscore(String key, String member)`

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

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

- ## Constructor Details

  - ### JedisContainer

    public JedisContainer(redis.clients.jedis.JedisPool jedisPool)
    Constructor.
    Parameters:
      `jedisPool` - JedisPool which actually manages Jedis instances

- ## Method Details

  - ### close

    public void close()
    Release Container.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Specified by:
      `close` in interface `JedisCommandsContainer`

  - ### exists

    public Boolean exists(String key)
    Specified by:
      `exists` in interface `JedisCommandsContainer`

  - ### get

    public String get(String key)
    Specified by:
      `get` in interface `JedisCommandsContainer`

  - ### hget

    public String hget(String key, String field)
    Specified by:
      `hget` in interface `JedisCommandsContainer`

  - ### geoadd

    public Long geoadd(String key, double longitude, double latitude, String member)
    Specified by:
      `geoadd` in interface `JedisCommandsContainer`

  - ### geopos

    public List<redis.clients.jedis.GeoCoordinate> geopos(String key, String... members)
    Specified by:
      `geopos` in interface `JedisCommandsContainer`

  - ### hexists

    public Boolean hexists(String key, String field)
    Specified by:
      `hexists` in interface `JedisCommandsContainer`

  - ### hset

    public Long hset(String key, String field, String value)
    Specified by:
      `hset` in interface `JedisCommandsContainer`

  - ### lpop

    public String lpop(String key)
    Specified by:
      `lpop` in interface `JedisCommandsContainer`

  - ### pfadd

    public Long pfadd(String key, String... elements)
    Specified by:
      `pfadd` in interface `JedisCommandsContainer`

  - ### pfcount

    public long pfcount(String key)
    Specified by:
      `pfcount` in interface `JedisCommandsContainer`

  - ### rpush

    public Long rpush(String key, String... string)
    Specified by:
      `rpush` in interface `JedisCommandsContainer`

  - ### sadd

    public Long sadd(String key, String... member)
    Specified by:
      `sadd` in interface `JedisCommandsContainer`

  - ### scard

    public Long scard(String key)
    Specified by:
      `scard` in interface `JedisCommandsContainer`

  - ### set

    public String set(String key, String value)
    Specified by:
      `set` in interface `JedisCommandsContainer`

  - ### sismember

    public Boolean sismember(String key, String member)
    Specified by:
      `sismember` in interface `JedisCommandsContainer`

  - ### zadd

    public Long zadd(String key, double score, String member)
    Specified by:
      `zadd` in interface `JedisCommandsContainer`

  - ### zrank

    public Long zrank(String key, String member)
    Specified by:
      `zrank` in interface `JedisCommandsContainer`

  - ### zscore

    public Double zscore(String key, String member)
    Specified by:
      `zscore` in interface `JedisCommandsContainer`