Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Browsing all 2203 articles
Browse latest View live
↧

RedisTemplate save multiple key value pairs to hash problem

I've started using RedisTemplate in a spring app. opsForHash() has a 'put' method, but it only takes three parameters. I want to save a number of key-value pairs. This is very simple to do in node,...

View Article


Elatsic cache - redis - Not able to connect after writing ~30-40 K keys-...

I am using Elastic cache redis with 4 shards and 2 replica nodes for each shard, in total 12 nodes. I am using spring data redis with lettuce. Below is my configuration for cluster connection -public...

View Article


How to insert to redis with combined id from 2 fields in spring data?

I have an entity as Student and it has 3 fields: name, surname, score. I want to store them into redis, but my key must be name and surname together and score will be the value.I tried to do something...

View Article

Is there a redis library which handles the pipelining automatically?

I am looking at the possibility of triggering the redis command from the client as a normal api and the library can pipeline the commands into it and possibly reply asynchronously back. Any library for...

View Article

How can I preserve type info when using RedisTemplate to store data?

I'm using RedisTemplate to store Long value, I store it successfully, I expect that I can get that Long value back, but the type of that value is not Long, but Integer.RedisTemplate<String,...

View Article


Health Check Redis Server

I have tried doing the health check of Redis Server using the below code:Jedis jedis = null; try { jedis = new Jedis(System.getenv(REDIS_END_POINT), Integer.parseInt(System.getenv(REDIS_PORT)),true);...

View Article

Can't connect to redis from spring inside docker container

I am experimenting with containerization and trying to run an executable jar inside a docker container that writes to redis.I have already tried every suggestion on StackOverflow that I could find,...

View Article

Java: Can I use Redis db to create Priority queues and the priority is set...

I am new to Redis. I want to use priority queues in Redis via Java client. I will have a set of key value pairs. And use this as a priority queue.The data set contains keys and its corresponding...

View Article


Redis - Expired Indexes are not deleted

I found the following question (Spring Redis - Indexes not deleted after main entry expires) about a problem with expiration of indexes in Redis.The problem is that the main and :phantom entries expire...

View Article


Spring Data Redis Expire Key

I have a One Spring Hibernate Application. In my application, Recently i am implemented Spring data Redis.spring-servlet.xml <!-- redis connection factory --> <bean id="jedisConnFactory"...

View Article

Spring Using Redis @Cacheable

Can any one suggest a Redis (NoSQL DB) example for a Collection type? Generally we use the following (in Spring): @Cacheable(value = "PRODUCT", key = "#productId" ) public Map<String,Object>...

View Article

Is Redisson getLock() Safe for Distributed Lock Usage?

Is Redisson's getLock() method good for a distributed use case, and how does it compare to getRedLock()?Redisson (3.11.x) has several methods to instantiate...

View Article

What is the most scalable/secure way to handle refresh tokens in a JWT...

I am building my own authentication microservice and although I have the main setup in place (generating access tokens etc.), I am a bit lost when it comes to refresh tokens.I feel there are a lot of...

View Article


Object can not be serialized

I have been getting "CarVO object doesn't implment serializable or Externalizable exceptions". Though my CarVO object implements Serializable and has serialVersionUid in it and it has only One member...

View Article

using jedis hmset method for inserting multiple field element in redis

I am implementing a simple redis command using jedis in java. The redis-cli command is:hmset myhash key "value1" field2 "value2" field3 "value3"The problem is that jedis's hmset method requires two...

View Article


How to check cache keys gets created in Redis

I have written a code that uses Redis to store a key. Used CacheManage for that purpose. To test it, I have added one unit test cases. Code has been written in Java and a Docker instance is running in...

View Article

Memory leak warning in spring boot

_ o.a.c.loader.WebappClassLoaderBase.log - The web application [ROOT] appears to have started a thread named [lettuce-eventExecutorLoop-1-1] but has failed to stop it. This is very likely to create a...

View Article


RedisTemplate getExpire() return unexpect value in Springcache

I wanne refresh cache while near expiry. So I override part of springcache, and manage cache in my own redisCacheManager.Everything works fine, but when running the "get" method, unexpected values...

View Article

convert redis subscribe message to model object for post call

I am subscribing to redis topic. I am reading the model message which is in org.springframework.data.redis.connection.Message format. I am able to convert to message to string.Employee [userName=efgh,...

View Article

Spring boot Redis: move element at first in one sentense on zset

I'm using redis under spring boot.This is my related code:this.listOps.remove(key, value); this.listOps.add(key, value, System.currentTimeMillis()); I'm trying to remove and element and add it on the...

View Article
Browsing all 2203 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>