AbstractQueuedSynchronizer (AQS) source code detailed analysis - Semaphore source code analysis
1. Introduction
Semaphore, a semaphore, holds a series of permissions. Each call to the acquire() method will consume a license, and each call to the release() method will return a license.Semaphore is usually used to limit the number of accesses to shared resources at the same time, which is often referred to as flow restriction.Semaphore sem ...
Posted by mona02 on Sat, 19 Feb 2022 06:30:32 +0100
Why does HashMap concurrency cause dead loops?
Today, when studying the Java concurrency container and framework, we can see why we should use ConcurrentHashMap. One reason is: thread unsafe HashMap. HashMap will cause a dead loop when executing put operation concurrently, because multithreading will cause the Entry linked list of HashMap to form a ring data structure and fall into a dead l ...
Posted by jeff2007XP on Sat, 19 Feb 2022 06:28:36 +0100
Integration of springcloud components and Zuul implementation of service gateway
1, What is Zuul?
Zuul is an open source API Gateway server of netflix. It is essentially a web servlet application. The core of Zuul is a series of filters, which can be compared with the Filter of Servlet framework or AOP. Zuul can realize the following functions by loading the dynamic filtering mechanism: Verification and security: Ide ...
Posted by pacmon on Sat, 19 Feb 2022 04:57:32 +0100
Implementation of Spring AOP
Implementation of Spring AOP
XML + interface mode enabled XML + custom class implementation Annotation mode on
Import dependency: (although this project is not a springboot project, you only need to import the following dependency)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>sprin ...
Posted by sayedsohail on Sat, 19 Feb 2022 04:56:41 +0100
Brother dei, is your code looping?
preface
I think the topic of code looping is very interesting. Because as long as developers, they will step through this pit. If you really haven't stepped on it, it only means that you write less code, or you are a real God.
Although many times, we try our best to avoid such problems, many times, the dead cycle comes quietly and pits you in ...
Posted by sharyn on Sat, 19 Feb 2022 04:30:21 +0100
Differences between abstract classes and interfaces and between abstract classes and interfaces
Preface:
catalogue
abstract class
1. What is an abstract class
2. What data type is an abstract class?
3. How are abstract classes defined?
4. Purpose of abstract classes?
5. Can a subclass of an abstract class be an abstract class?
6. Why must an abstract class have a constructor
7. Abstract method
9. Abstract ...
Posted by razta on Sat, 19 Feb 2022 04:18:41 +0100
Software testing handout (full version)
Software testing handout
Edit java files using Notepad
1. Configure java path
1.1 select the computer icon / right-click to select the properties of the drop-down menu/ 1.2 select the advanced system Settings link
1.3 select the environment variable button in the system properties window 1.4 select the "classpath" path in the s ...
Posted by saandel on Sat, 19 Feb 2022 03:56:46 +0100
Parsing of XML message in Java Development Notes
preface
xml messages need to be parsed in project tasks. So I began to learn relevant knowledge. After checking many blog posts, I found a good one, which is very practical.
Reprint source: Java Development Notes (109) definition and parsing of XML message
The following is the reproduced text, with slight deletion
text
Although json st ...
Posted by Randy on Sat, 19 Feb 2022 03:51:01 +0100
Java Engineer's road to God IO
Original author: Hollis
Character stream, byte stream
Bytes and characters
Bit is the smallest binary unit and is the operating part of the computer. Value 0 or 1
Byte (byte) is the smallest unit of computer operation data, which is composed of 8 bit s. The value (- 128-127)
Char (character) is the smallest readable and writable unit of th ...
Posted by annette on Sat, 19 Feb 2022 03:49:54 +0100
< LeetCode > question brushing record
Bracket sequence
import java.util.*;
public class Solution {
/**
*
* @param s string character string
* @return bool Boolean type
*/
public boolean isValid (String s) {
// write code here
Stack<Character> stack=new Stack<>();
for(char ch:s.toCharArray()) //Convert strin ...
Posted by PHPcoder25 on Sat, 19 Feb 2022 03:02:38 +0100