redis caching with Spring custom annotations
1, Foreword
Redis is one of the basic components that must be used in distributed microservices. At present, it is basically used in most domestic projects, and caching is one of its main functions. Frequent use of set() method to add annotations in projects will cause code duplication and bloated. For those who do not have enough development ...
Posted by jaymc on Wed, 13 Oct 2021 04:26:16 +0200
Immutable classes and meta patterns - Concurrent Programming (Java)
1. Use of immutable classes
There are the following codes
import lombok.extern.slf4j.Slf4j;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@Slf4j(topic = "c.DateFormatMutable")
public class DateFormatMutable {
public static void main(String[] args) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); ...
Posted by magicdanw on Fri, 01 Oct 2021 05:14:16 +0200
In depth analysis of AQS implementation principle
Briefly explain that J.U.C is a concurrency toolkit provided in JDK, java.util.concurrent. It provides many utility classes commonly used in concurrent programming, such as atomic operations, lock synchronization locks, fork/join, etc.
Starting from Lock
I want to use lock as a starting point to explain AQS. After all, synchronization lock ...
Posted by wilburforce on Sun, 26 Sep 2021 07:30:11 +0200
Concurrent programming - thread advanced (conductor story)
2, Thread advanced (classic question: conductor ticket)
1. Thread implementation method
No more nonsense, code first
(1) Inherit Thread class
public class MyThread extends Thread{
@Override
public void run() {
System.out.println("inherit Thread Class mode");
}
public static void main(String args[]){
MyTh ...
Posted by crob611 on Sat, 18 Sep 2021 18:17:53 +0200
Kafka, RabbitMQ, RockedMQ real application development summary 1
Summary of practical applications of Kafka, RabbitMQ and RockedMQ 1.Kafka
Combined with the use cases on the official website, this paper records the examples and practical application of the three mainstream mq.This article does not cover the installation and configuration of relevant environments, but involves more comprehensive codes (inclu ...
Posted by The Cat on Sun, 12 Sep 2021 03:35:20 +0200
Chapter 26 (Concurrency: Introduction) of Operating Systems: Three Easy Pieces
Introduction to operating system : Operating Systems: Three Easy Pieces
After class exercises: https://pages.cs.wisc.edu/~remzi/OSTEP/Homework/homework.html
The translation of the README part of the exercises after class in this chapter (easy to view later):
Welcome to this simulator. The idea is to get familiar with threads by observing h ...
Posted by kristian_gl on Mon, 06 Sep 2021 03:37:40 +0200