Handwriting a thread pool, take you to learn the implementation principle of ThreadPoolExecutor thread pool
Absrtact: starting from the handwriting thread pool, gradually analyze how these codes are implemented in the Java thread pool.
This article is shared from Huawei cloud community< Handwritten thread pool, compare and learn the implementation principle of ThreadPoolExecutor thread pool! >, author: Xiao Fu Ge.
Thanks for the plane, note ...
Added by brucensal on Mon, 14 Feb 2022 06:12:20 +0200
Nginx - minimum configuration
A secure server is one that allows only the required number of servers. Ideally, we will build the server based on the smallest system by enabling other functions separately. Minimal configuration is also helpful for debugging. If the error is not available in the smallest system, add functions separately, and then continue to search for errors ...
Added by CMC on Mon, 14 Feb 2022 06:07:20 +0200
Using SA token to solve WebSocket handshake authentication
preface
Compared with the single communication mode of Http, WebSocket can actively push messages from the server to the browser. This feature can help us complete some specific services such as order message push, IM real-time chat and so on.
However, WebSocket itself does not provide direct support for "identity authentication", a ...
Added by ShootingBlanks on Mon, 14 Feb 2022 06:03:20 +0200
Java generic explanation, the most complete graphic explanation in history!
Generics play an important role in java, which can be seen in both open source framework and JDK source code.
It is no exaggeration to say that generics are essential elements in general design, so it is a required course to truly understand and correctly use generics.
1: Generic essence
Java generics is a new feature introduced in JDK ...
Added by cornelalexa on Mon, 14 Feb 2022 06:03:22 +0200
Java Agent for bytecode instrumentation
Java Agent for bytecode instrumentation
This article will explain the knowledge of Java Agent in detail, uncover its mystery, help developers understand its dark magic and help us complete more business needs
What is Java Agent
Java Agent, also known as Java probe, provides the function of adding bytecode to existing compiled Java classes, w ...
Added by php_jord on Mon, 14 Feb 2022 03:17:53 +0200
Use and principle of AQS related implementation classes
1,AQS
1.1 overview
Its full name is AbstractQueuedSynchronizer. It is the framework of blocking lock and related synchronizer tools, which has its own characteristics
The state attribute is used to represent the state of resources (exclusive mode and shared mode). Subclasses need to define how to maintain this state and control how ...
Added by rainerpl on Mon, 14 Feb 2022 03:07:35 +0200
[easily understand design mode] after reading the decorator mode of take-off
I'm < font color = #2941c0 > "kangarooking" < / font >, not my brother's brother. An Internet worm "gua" cow will climb up step by step with you. One day there will be a day for us. Pay attention to me and make a little progress every day ❗ ❗ ❗prefaceThe experience of learning design mode mentioned in the arti ...
Added by jayskates on Mon, 14 Feb 2022 01:23:52 +0200
log4j vulnerability analysis and summary
The Remote Code Execution Vulnerability of log4j2 [cve-2021-44228] exposed on December 8, 2021 can be called an epic nuclear bomb vulnerability. Although after such a long time, most of the relevant vulnerabilities in the current network have been repaired, they can still be found... Many leaders and research institutions on the Internet have a ...
Added by KrisNz on Sun, 13 Feb 2022 18:24:21 +0200
Generic, Set set, TreeSet Set, binary tree
generic paradigm
Set
TreeSet
01. Generics - Overview
The role of generics?
Is a new feature introduced in JDK5. It provides a mechanism for type safety checking at compile time
Benefits of generics?
1. The possible problems at runtime are advanced to the compilation period
2. Casts are avoided
public class D ...
Added by Tjk on Sun, 13 Feb 2022 17:57:55 +0200
sentinel sliding window traffic statistics
StatisticSlot mainly counts two types of data:Number of threadsNumber of requests, i.e. QPSThe statistics of the number of threads is relatively simple. It is the statistics of the current number of threads through the internal maintenance of LongAdder. Add 1 for each thread, and subtract 1 after thread execution, so as to obtain the number of ...
Added by kts on Sun, 13 Feb 2022 16:48:05 +0200