synchronized is no longer bloated. Put down the lightweight lock of his initial knowledge

preface Natural selection, survival of the fittest. JDK is also in constant optimization. As for the internal optimization of synchronized locks in JDK, we analyzed that biased locks are used to solve initial problems. With the continuous accumulation of competition, lightweight locks are produced.Pay attention to me, a progressive social anim ...

Posted by animedls on Mon, 28 Mar 2022 04:39:25 +0300

SpringBoot integrates Redis to serialize and store Java objects

After reading many articles, there are basically no more than two kinds of objects stored in Redis: convert the object into Json, and then deserialize it after taking it out, or convert the object into byte []. If you use spring boot, it may be easier to use spring data Redis. First, we use maven to build the Spring Boot project and introduce ...

Posted by phphunger on Mon, 28 Mar 2022 00:32:06 +0300

On the perfect scheme of Redission to realize distributed lock and Lua script

On the perfect scheme of Redission to realize distributed lock and Lua script preface In the previous article, I mentioned the redis distributed lock implementation and lua script related knowledge In some scenarios, multiple processes must monopolize and share resources in a mutually exclusive manner. At this time, distributed lockin ...

Posted by andreas on Sat, 26 Mar 2022 17:19:12 +0300