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

I'm getting a corrupted value from Spring Redis MessageReceiver

I'm playing with Spring/Redis/Jedis for a simple message queue system. I've brought up a simple test case using just Strings, but for some reason the strings are coming back corrupted. I was originally...

View Article


set springboot starting check redis,database,mq

I want set springboot starting check redis,database,mq connection@Configuration@EnableCachingpublic class RedisConfig extends CachingConfigurerSupport { @Bean public CacheManager...

View Article


Spring Data and Redis - serializing transient fields

I am using Redis as my database with Spring data, with no custom value or hash value serializer. I assume the standrad JdkSerializationRedisSerializer should be used then for objects serialization. It...

View Article

How to efficiently record and get the total handled time between a period...

Imagine this scene, Your boss wants to know how long you spend time in front of your laptop between 2 p.m and 3 p.m. However, you may leave to have a snack or buy a cup of coffee. Is there a good...

View Article

How to fetch cached value using redisson client

I wanted to fetch cached(@Cachable) value using redisson client but it return strange data if i use any codec in redisson client (getBucket("fruit::1",StringCodec.INSTANCE)) and it throws error unless...

View Article


How to delete a list of keys in Redis using Java/Spring APIs and return...

I have a logic which needs to delete a list of keys in Redis cache and I want to know whether all keys are deleted or not (if all of them deleted successfully, I want to get result "true", but if some...

View Article

Fetch n number of keys from redis

Is there any way I can fetch n number of keys from redis?I have a huge list of keys in redis , How can I fetch n keys at a time something like fetch 10k record at a time as CSV files.Thanks in advance.

View Article

Update entity in redis with spring-data-redis

I'm currently using Redis (3.2.100) with Spring data redis (1.8.9) and with Jedis connector.When i use save() function on an existing entity, Redis delete my entity and re create the entity.In my case...

View Article


Update Single Field of Hash in Redis

Is it possible to update single field of Student object without needing other ones? Lets say I want to update grade field.import com.ahmetk.redis.redishll.model.Student;import...

View Article


Add custom object list to Redis

I am a newbie to Redis. I want to store and search over a list of custom objects in Redis cache.custom object has 4 attribute configKeyconfigScopevalueTypeconfigValueSample custom...

View Article

Spring Boot cannot retrieves data from Redis provided by Python script

I'm creating some architecture where my spring boot app will retrieves data from Redis.Data to Redis will be provided via Python script.I set in both apps the same data base index. But when I write...

View Article

Redis expire keys

I've some leaderboard stats for my players. Leaderboards have daily,weekly and monthly stats. So I using redis with its expire feature for leaderboards but there's a thing that I'd want to know. Is...

View Article

Redis pipeline usage

I'm trying to understand how pipeline works nad want to try something different. I've noticed that there's no method for setting expire key if the key doesn't have any so I made an example for that...

View Article


Image may be NSFW.
Clik here to view.

Spring Data - Redis repository doesn't sort with pageRequest

I am calling repository by id and pageRequest parameters but I cannot manage to sort the result. I call my repository in service layer as follow:Sort sort = new Sort(Sort.Direction.DESC,...

View Article

Setting size restrictions for value to individual redis keys?

Is it possible to set size restriction for value in redis. For example, I want to store only values in which its size should be less than 2 MB to the redis key. value having size greater than 2 MB...

View Article


How can I use Redisson Write-through caching strategy with an auto-generated PK

I am planning to use Redis with Redisson as a caching layer between my Java app and a PostgreSQL DB. I have a table called Nodes looking like this:CREATE TABLE nodes(node_id bigint GENERATED BY DEFAULT...

View Article

it is safe to keep database connection open? [closed]

In java Enterprise Edition with lots of requests like 5000 requests per minute It is safe to keep jdbc connection open with postgresql forever?If I do that the performance is good or not?How about...

View Article


Connection refuse redis with docker image since java with spring-boot

I have the following question that I have not managed to solve, I have the following images running in docker: images listIn order to run my redis image I use the following command:docker run --rm -d...

View Article

Creating custom commands (i.e. sending raw bytes) to Spring Data Redis?

I am modifying Redis's source code and have added several commands (say, ZHELLOWORLD). However, how could I call them in Spring Data Redis? Thanks!My naive idea: We can do that using Lettuce, and we...

View Article

One Lettuce Redis connection per servlet?

In a servlet, should Lettuce Redis connections be created in init() and shutdown in destroy() or should a connection be created for every request (in doPost or doGet?) I am using sync RedisCommands...

View Article
Browsing all 2203 articles
Browse latest View live


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