Package org.apache.storm.redis.common.adapter

# Class RedisCommandsAdapterJedis

java.lang.Object
org.apache.storm.redis.common.adapter.RedisCommandsAdapterJedis

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

public class RedisCommandsAdapterJedis extends Object implements RedisCommands, Closeable
Adapter class to make Jedis instance play with BinaryRedisCommands interface.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RedisCommandsAdapterJedis(redis.clients.jedis.Jedis resource)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `Long`
  `del(byte[] key)`
  `Long`
  `del(String key)`
  `Boolean`
  `exists(byte[] key)`
  `boolean`
  `exists(String key)`
  `Long`
  `hdel(byte[] key, byte[]... fields)`
  `byte[]`
  `hget(byte[] key, byte[] field)`
  `Map<byte[],byte[]>`
  `hgetAll(byte[] key)`
  `Map<String,String>`
  `hgetAll(String key)`
  `String`
  `hmset(byte[] key, Map<byte[],byte[]> fieldValues)`
  `String`
  `hmset(String key, Map<String,String> fieldValues)`
  `redis.clients.jedis.resps.ScanResult<Map.Entry<byte[],byte[]>>`
  `hscan(byte[] key, byte[] cursor, redis.clients.jedis.params.ScanParams params)`
  `String`
  `rename(byte[] oldkey, byte[] newkey)`
  `String`
  `rename(String oldkey, String newkey)`

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

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

- ## Constructor Details

  - ### RedisCommandsAdapterJedis

    public RedisCommandsAdapterJedis(redis.clients.jedis.Jedis resource)

- ## Method Details

  - ### hget

    public byte[] hget(byte[] key, byte[] field)
    Specified by:
      `hget` in interface `RedisCommands`

  - ### exists

    public Boolean exists(byte[] key)
    Specified by:
      `exists` in interface `RedisCommands`

  - ### exists

    public boolean exists(String key)
    Specified by:
      `exists` in interface `RedisCommands`

  - ### hmset

    public String hmset(byte[] key, Map<byte[],byte[]> fieldValues)
    Specified by:
      `hmset` in interface `RedisCommands`

  - ### hmset

    public String hmset(String key, Map<String,String> fieldValues)
    Specified by:
      `hmset` in interface `RedisCommands`

  - ### hgetAll

    public Map<byte[],byte[]> hgetAll(byte[] key)
    Specified by:
      `hgetAll` in interface `RedisCommands`

  - ### hgetAll

    public Map<String,String> hgetAll(String key)
    Specified by:
      `hgetAll` in interface `RedisCommands`

  - ### hdel

    public Long hdel(byte[] key, byte[]... fields)
    Specified by:
      `hdel` in interface `RedisCommands`

  - ### del

    public Long del(byte[] key)
    Specified by:
      `del` in interface `RedisCommands`

  - ### del

    public Long del(String key)
    Specified by:
      `del` in interface `RedisCommands`

  - ### rename

    public String rename(byte[] oldkey, byte[] newkey)
    Specified by:
      `rename` in interface `RedisCommands`

  - ### rename

    public String rename(String oldkey, String newkey)
    Specified by:
      `rename` in interface `RedisCommands`

  - ### hscan

    public redis.clients.jedis.resps.ScanResult<Map.Entry<byte[],byte[]>> hscan(byte[] key, byte[] cursor, redis.clients.jedis.params.ScanParams params)
    Specified by:
      `hscan` in interface `RedisCommands`

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Throws:
      `IOException`