Questions tagged [jedis]

Jedis is a small free client for Redis, written in and for Java.

From its GitHub repository:

Jedis is a Java client for Redis designed for performance and ease of use.

Resources

868 questions
5
votes
1 answer

Redis Sentinel with read from Slaves write to Master

Our current Redis setup is a Web application client using Jedis to directly connect using one JedisPool for writes to a single Redis master and a second JedisPool for reads from a single Redis slave. The slave is setup to replicate the master. We…
ptha
  • 836
  • 1
  • 8
  • 22
5
votes
1 answer

Thread in 'parking to wait' state on Redis dequeue

I have a tomcat - spring4.2 application that runs multiple threads. Each thread dequeues from only one queue, however there are more than one threads assigned to a queue. Things start fine, but after few hours / ~500k dequeue operations, I find…
5
votes
1 answer

Get expired value with Jedis

I followed this guide Redis Key expire notification with Jedis to listen expired key. But i don't know how to get its expired value. Is there a way to get value of the expired key ? Please help. Thank you!
Vunb
  • 484
  • 8
  • 34
5
votes
2 answers

aws Redis cluster from spring using jedis client

I have integrated redis to my spring web application using jedis (redis is supporting from AWS Elastic cache). It is working fine with single node to write and read with single jedis connection factory. I now need to extended it to a cluster for…
Balaji
  • 151
  • 4
  • 15
5
votes
1 answer

How to get multiple list values in one single call in RedisTemplate of Jedis Client

I am using RedisTemplate to get and store data as a list. When I am storing data - I store it as redisTemplate.opsForList().rightPush("key1", "value11"); redisTemplate.opsForList().rightPush("key1",…
BKSingh
  • 527
  • 2
  • 11
  • 20
5
votes
1 answer

does redis cluster support transactions ?

i'm a newbie for redis, i've just been using redis for couple of months. Currently i'm using 2.8.x stable version but i'm trying to use 3.0.0 to import redis cluster funtions. i'm using java jedis as client,and here is my problem:i found that the…
Kim
  • 5,045
  • 6
  • 38
  • 60
5
votes
1 answer

Getting values with jedis pipeline

I have a list of ids that I want to use to retrieve hashes from a Redis server using the java client jedis. As mentioned in the documentation, Jedis provides a way to use the pipeline by declaring Response objects and then sync the pipeline to get…
addonis1990
  • 489
  • 1
  • 6
  • 17
5
votes
2 answers

Does Spring's JedisConnectionFactory support the new JedisCluster?

We are migrating our Redis stack over to Redis Cluster. In portions of our application, this has meant that we have had to replace the Jedis object with the JedisCluster object. In our Spring client, we use the JedisConnectionFactory to persist…
John Russell
  • 1,115
  • 1
  • 15
  • 30
5
votes
1 answer

How to dispose Spring RedisTemplate safely?

I have to create RedisTemplate for each of the requests (write/read) on demand. The connectionfactory is JedisConnectionFactory JedisConnectionFactory factory=new JedisConnectionFactory(RedisSentinelConfiguration,JedisPoolConfig); Once, I do…
Ahamed Mustafa M
  • 3,069
  • 1
  • 24
  • 34
5
votes
2 answers

Listener for Redis in Java

Is it possible to set a listener in Redis which is triggered when an item (value/key) is inserted in Redis or when an value is changed? I researched library Jedis and Redisson, but found nothing.
user3541830
  • 75
  • 2
  • 8
5
votes
1 answer

Check value exists and return if it does Jedis Redis

I am using the Jedis Redis client and would like to be able to make sure if a key exists and if so then get the value. I am currently using an if statement to check if the key exists and if it doesn't then return null. I am assuming this is not the…
user2248702
  • 2,741
  • 7
  • 41
  • 69
5
votes
2 answers

Jedis : Could not get a resource from the pool

Background Our application uses Jedis-2.2.1 and connects to Redis-2.6, here's how I get jedis resource : protected static JedisWrapper getRedisUserWrite(String UDID) { if (redisUserWritePools.get(0) == null) init(); int hash =…
WoooHaaaa
  • 19,732
  • 32
  • 90
  • 138
5
votes
0 answers

UnknownHostException and /etc/hosts

I have records in /etc/hosts file which contains IPv4 and IPv6 addresses for host-name.com But I sometimes get UnknownHostException like: redis.clients.jedis.exceptions.JedisConnectionException: java.net.UnknownHostException: host-name.com at…
valodzka
  • 5,535
  • 4
  • 39
  • 50
5
votes
1 answer

Redis Connection Closed Error

I get a connection exception (given at the end) even though I did the following: While creating an instance of Jedis, I set the timeout field to 1 hr (60*60*1000). I also tried it with 0, that doesn't work either. When I checked the log after 7…
Alex
  • 1,406
  • 2
  • 18
  • 33
5
votes
2 answers

spring-data-redis redisTemplate Exception

When I call get() method, an exception occured here is the code @Service("RedisService") public class RedisServiceImpl implements RedisService { @Autowired RedisTemplate redisTemplate; @Override public Long get(String key) { …
이민규
  • 151
  • 2
  • 4
  • 8