Protostuff Serialization of String

cause When using redis, in order to facilitate operation, the following help classes are written, including a help function for hmset, which is serialized using Protostuff serialization. /** * mset */ public <K extends Serializable, V extends Serializable> void hmset(String key, Map<K, V> hash, int expireSeconds) ...

Posted by Rongisnom on Sun, 30 Jun 2019 18:48:00 -0700

Too many Spring MVC configurations? Try Spring Boot

Spring MVC believes that you are no longer unfamiliar, you may have a disgusting feeling about Spring's various XML configurations. Spring's official Spring boot has been published for a long time. Spring boot is a lightweight framework of "convention is better than configuration". Spring boot first solves all kinds of tedious XML con ...

Posted by mclamais on Tue, 25 Jun 2019 17:06:13 -0700

Redis serialization protocol

RESP Send Command Format The sending command format RESP specifies the following format for a command. CRLF stands for "r\n": * < Number of Parameters > CRLF Number of bytes in parameter 1 > CRLF Parameter 1 > CRLF ... Number of bytes of parameter N > CRLF Parameter N > CRLF In the case of set hello world, what yo ...

Posted by zeno on Tue, 25 Jun 2019 12:00:30 -0700

How to Control Concurrency by Redis Distributed Lock

Interpretation of redis command Say Redis Distributed locks are implemented by combining setNx commands with getset. Before we talk about them, let's first understand the meaning of setNx and getset. redis The official website explains this. Note: redis commands are atomic operations SETNX key value Set the value of the key to value if and ...

Posted by oldschool on Sat, 22 Jun 2019 14:37:48 -0700

spring-boot-starter-redis Learning Notes

Personal notes are for reference only. 1. spring data redis recommends jedis, which is the java client of redis. <dependency> <groupId>org.springframework.boot</groupId><!-- Incidental introduction jedis Package --> <artifactId>spring-boot-starter-redis</artifactId> </dependency> ...

Posted by reinaldo on Fri, 14 Jun 2019 17:52:54 -0700

Simple redis cache operations (get, put)

Simple redis cache operations (get, put) This article describes simple redis caching operations, including introducing the jedisjar package, configuring redis, some tools needed by RedisDao, put ting data into redis, fetching data from redis, and logic for accessing redis. 1. Introducing the jedis jar package <!-- java Visit redis Of jar pa ...

Posted by im8kers on Thu, 23 May 2019 10:33:25 -0700

Spring Extreme Speed Integrated Annotation redis Practice

Redis serves as a memory-based Key-Value database and has a high cost-effective performance as a cache server. The official Java-oriented Client Jedis provides many interfaces and methods for Java operations to use Redis. The Spring team encapsulated Jedis independently as a spring-data-redis project, cooperating with spring ...

Posted by shadowq on Fri, 17 May 2019 20:41:44 -0700

Spring-data-redis for Redis Learning

Spring-data-redis for Redis Learning Preface Earlier, we learned the basics of Redis and how to operate Redis through Jedis in Java. At the same time, we also mentioned that Jedis's operation is too low-level, or not completely encapsulated. When we want to store an object, it's actually troublesome. So let's learn another o ...

Posted by mikep on Sat, 11 May 2019 04:28:46 -0700

JAVA:SSM\Distributed CacheRedis\/spring data redis

Redis Distributed Cache Redis is an open source Key-Value database that stores data in memory and is written in C. Enterprise development typically uses redis for caching. operation flow Get data from redis first, return directly if you get data, you don't need to access the database. If you can't get data, you can query ...

Posted by gurhy on Sun, 28 Apr 2019 23:30:36 -0700

Jedis source code analysis: client design and implementation routine

Preface Jedis is the preferred client for java application to access Redis service. This paper analyses the source code of jedis client, and picks up the common routine of client design and implementation. Connection To access (Redis) services, you first need to establish a connection with the service, so the client library first needs to abstr ...

Posted by divadiva on Sun, 21 Apr 2019 17:33:33 -0700