Based on redis6 0 deployment of mini version message queue

Technical research background As the current R & D team is in the start-up stage of the company, there is no mature operation and maintenance system, and the ability to build and maintain the mature MQ commonly seen in the market is insufficient. However, we hope to have a lightweight message system for the members of the R & D team. T ...

Added by Hellusius on Sun, 13 Feb 2022 16:37:18 +0200

synchronized deep parsing of pain points in Java stamp

Overview: Introduction: role, status, impact of not controlling concurrency Usage: object lock and class lock 7 cases of multithreaded access synchronization method Nature: reentrant, non interruptible Principle: add unlock principle, reentrant principle, visibility principle Defects: low efficiency, not flexible enough, unable to predic ...

Added by menriquez on Sun, 13 Feb 2022 15:49:56 +0200

JDK source code series - HashMap implementation principle

1, Introduction HashMap is implemented by hash table, with key/value storage structure. Each key corresponds to a unique value. The speed of query and modification is very fast, and can reach the average time complexity of O(1). It is non thread safe and does not guarantee the storage order of elements; 2, Inheritance class diagram hashMap im ...

Added by Buttero on Sun, 13 Feb 2022 15:47:19 +0200

2 annotation reflection and dynamic proxy

1.2 annotation reflection and dynamic proxy 1.2.1 reflection Reflective entry Java lang.Class Objects in daily development are divided into two types: basic type and reference type Basic type, (8 fixed) Integer: byte, short, int, long Decimal: float, do ...

Added by ionik on Sun, 13 Feb 2022 14:42:04 +0200

From scratch, use Jenkins to build and publish Pipeline pipeline projects

1, Environment installation and deployment 1. Install JDK 2. Configure environment variables C:\Program Files\Java\jdk1.8.0_152\bin 3. Install and activate IDEA -javaagent:D:\IntelliJ IDEA\IntelliJ IDEA 2019.3.1\bin\jetbrains-agent.jar 4. Build a web project 5. Install tomcat server Configure the IDEA to reco ...

Added by Jamesm on Sun, 13 Feb 2022 14:17:09 +0200

Lock free concurrency of JUC (leguan lock)

1. Quote There are the following requirements to ensure account Thread safety of withdraw withdrawal method interface Account { /** * Get balance * * @return Integer balance */ Integer getBalance(); /** * withdraw money * * @param amount Withdrawal amount */ void withdraw(Integ ...

Added by volomike on Sun, 13 Feb 2022 14:10:52 +0200

ConcurrentHashMap of thread safety class

1. Overview As shown in the figure, thread safe collection classes can be divided into three categories Legacy thread safe collections such as Hashtable and Vector Thread safe Collections decorated with Collections, such as: Collections.synchronizedCollection Collections.synchronizedList Collections.synchronizedMap Collecti ...

Added by RobM on Sun, 13 Feb 2022 13:53:02 +0200

Buffer stream & conversion stream & sequence commutation

preface Java - IO stream Foundation Buffer stream Byte buffer stream: BufferedInputStream, BufferedOutputStreamCharacter buffer stream: BufferedReader, BufferedWriter The basic principle of buffered stream is that when creating stream objects, a built-in buffer array of default size will be created to reduce the number of system IO thro ...

Added by dnice on Sun, 13 Feb 2022 13:05:39 +0200

Interface idempotency verification (use interceptor + custom annotation + redis to solve the problem)

Concept: Idempotency, in popular terms, is an interface that initiates the same request multiple times. It must be ensured that the operation can only be executed once For example: Order interface, cannot create order more than oncePayment interface. You can only deduct money once for repeated payment of the same orderThe callback interface ...

Added by Devious Designs on Sun, 13 Feb 2022 12:52:29 +0200

Introduction to Netty in Silicon Valley

Reproduced in the original text: Introduction to Netty and detailed explanation of NIO_ dzyls' notes - CSDN blog catalogue Introduction to Netty netty concept Noun concept netty application scenario Basic description of I/O model Basic description of I/O model There are three network programming models I/O modes supported by Java: Java ...

Added by evilcoder on Sun, 13 Feb 2022 11:00:09 +0200