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

Add listeners to cache expiration in Redisson

I am trying to configure my redis sentinel client to perform my specific jobs on expire event for different keys that I put to the cache. This jobs should check whether to renew the cache value or to...

View Article


Is Redisson FairLock suitable for use in a Redis cluster?

I need a solution to ensure a resource gets locked across multiple Java servers. We already have a master/slave Redis cluster for reliability. I'd like to use FairLock because it seems simpler than...

View Article


How to create a secondary CacheManager without overriding default spring-cache

I have a default redis cache configuration in my application.yml:cache: type: redis redis: time-to-live: 7200000 # 2 hour TTL - Tune this if needed later redis: host: myHost port: myPort password:...

View Article

How to verify if the Redis instance you are connected to is using encryption?

AWS Elasticache is offering as a feature encryption In-Transit and At-Rest.I would like to know if there is way to verify through a client if the Redis cluster you are connected to is using At-Rest...

View Article

Spring-data-redis @Cacheable java.lang.ClassCastException:...

I am using spring-data-redis for caching data in my spring boot app. I am using Mongo as my primary data source and Redis as a cache. When I hit the API for the first time, it fetches record from Mongo...

View Article


Java, Postgres, Redis: PostConstruct not completely working?

I would like to populate Redis from a Postgres table, and have a method that works. I would like this method to be run on application startup. However, when I try to use @PostConstruct, it seems to run...

View Article

serialization external library

I am using Redis in one of our project.While I realized that redis needs objects to be serialized to be persisted, I want to understand how to deal with some classes which refers to external library...

View Article

How to execute a redis extension command with reactiveredisoperations in...

I'm trying to use redisearch with java/spring reactive api. So with nodejs redis client I could just use send_command function and pass any redis command I wanted as an array of strings. This was...

View Article


Spring data redis (with lettuce) advantages for creating wrapper library

I am new to Redis and planning to use it as in memory cache. I am using Lettuce 5.2 client for it. I have multiple applications which will use redis as in memory cache. My idea is to write library...

View Article


java.lang.UnsupportedOperationException: Data source...

Trying to read data from Redis with spark 2.3(java) code. Able to read the non-streaming data from Redis, but unable to read data in case of streamed reading from Redis, I get the following errors: 1)...

View Article

JedisExhausedPoolException : Could not get a resource since the pool is...

I am trying to scan my redis cluster using jedis . This is the following code i am uisng config.setMaxTotal(30); // // maximum active connections config.setMaxWaitMillis(2000); // jedis cluster nodes...

View Article

Redis health check for spring boot 2 hangs

I have implemented some redis stuff in my spring boot 2.1.5 application. It works fine. I also want the health check for redis. If I switch off the redis server the health check (actuator/health) hangs...

View Article

Redis query with Latest date and unique id

We are using Redis connection with JedisConnectionFactory and using CrudRepository for querying data@Component @Configuration public class RedisConfig { @Bean public RedisTemplate<String, Object>...

View Article


Spring Data JPA with Redis: unable to store nested Map

I'm trying to save the below SessionEntity payload in a Redis datastore using Spring Data Redis via an implementation of the CrudRepository:{ "id": "59e05a73-064e-4344-9a3d-0565b344183c", "users": [{...

View Article

How to handle deserialization errors in reactive Redis

So serialization/deserialization work when all is great for my reactive stream subscription. However, classes can change, staggered server code rollouts, just putting a message directly onto a stream...

View Article


Jedis SpringBoot cannot serialize and deserialize Map

I got following error after adding @Cacheable annotation to one of my rest method: "status": 500, "error": "Internal Server Error", "message": "class java.util.ArrayList cannot be cast to class...

View Article

Image may be NSFW.
Clik here to view.

How to increment value of a existing redis hash field using increment()?

I want to increment the value of a hash which is already present in the Redis. I am using increment() function of a Redis template in following way.private RedisTemplate redisTemplate; String...

View Article


How to use jackson instead of JdkSerializationRedisSerializer in spring

I'm using redis in one of my java apps and I'm serializing a list of objects to be stored in Redis. However, I noticed that using the RedisTemplate would use the JdkSerializationRedisSerializer....

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

Session scoped bean serialization Autowire issue

I have a simple set of two beans.@Service @Scope(scopeName = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public class CartService implements Serializable { private ProductService...

View Article
Browsing all 2203 articles
Browse latest View live


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