Detailed explanation of the execution order case of Pipeline's ChannelHandler in netty

I. Pipeline model of netty Netty's Pipeline model uses the responsibility chain design pattern. When the boss thread monitors that there is an accept event on the binding port, it instantiates the Pipeline for the socket connection, loads the InboundHandler and OutboundHandler into the Pipeline in order, and then mounts the socket connection ( ...

Posted by alexdoug on Fri, 25 Oct 2019 12:43:24 +0200

There was Cheng Yaojin's "three board axes" in ancient times, which shocked Sui and Tang Dynasties.

In many scenarios of distributed system, in order to ensure the final consistency of data, we need many technical solutions to support, such as distributed transactions, distributed locks and so on. Sometimes, we need to ensure that a method can only be executed by the same thread at the same time. In the stand-alone environment, Java actually ...

Posted by bogdaniel on Fri, 25 Oct 2019 08:14:53 +0200

Tomcat source code analysis 3: the source code analysis of Tomcat startup loading process

Source code analysis of Tomcat start loading process (1) Today, I will share the source code method to explain the loading process of Tomcat startup. For the architecture of tomcat, please refer to the article "Tomcat source code analysis II: first look at the overall architecture of Tomcat". First look at the application In the artic ...

Posted by scrupul0us on Fri, 25 Oct 2019 07:03:57 +0200

java entry project: two color ball lottery

Title Requirements: In addition, the red ball number cannot be repeated Because I'm not familiar with the use of classes, all of them are written into the same class. The impression is that the output and logic business are separated, but the feeling is not so separated, so it seems that the logic is a ...

Posted by muadzir on Thu, 24 Oct 2019 16:14:16 +0200

Java learning notes: Java language advanced features (generics)

Generic Generics Parameterized types type parameterization1. Definition of generics Generics is a new feature of JDK 1.5. Its essence is parameterized type. That is to say, the data type to be operated is specified as a parameter, and the specific type is specified when it is used. This parameter type ...

Posted by baccarak on Thu, 24 Oct 2019 13:28:09 +0200

Spring - concept, DI

Article directory Spring 1. Concepts of dependency injection (DI) and inversion of control (IOC) 2 create maven project steps 3 dependency injection 3.1 dependency injection String, class object 3.2 dependency injection List,Array,Map,Set 3.3 dependency injection internal bean object 3.4 null and n ...

Posted by mr00047 on Thu, 24 Oct 2019 13:18:55 +0200

Using JAXB to transform XML and JavaBean (supporting generics)

I saw that someone else had a medal of 1024, and I specially left one on October 24 this year to see if I could get it. In the daily development, it may involve the mutual call between interfaces. Although under the promotion of the concept of microservice, many companies use the lightweight JSON fo ...

Posted by manohoo on Thu, 24 Oct 2019 12:37:06 +0200

Multithreaded Download File practice Tour

Catalog 1. Use scenario 2. Principle of multi thread Download 3. How to download the request in sections 3.1. How to segment the requested data. 3.2. How to assemble the data downloaded in sections into a complete data file. 4. Key code implementation 3. Achievements 4, summary 5. Reference ...

Posted by moleculo on Thu, 24 Oct 2019 07:38:52 +0200

Multithreading and callback

Original link: http://www.cnblogs.com/1q2w3e/archive/2012/06/11/2544546.html I have been working for a year, but I haven't used many threads. It's so weak. I have a look today. I wrote a small example. Forget about it later. The main ta ...

Posted by Bogart on Wed, 23 Oct 2019 22:26:54 +0200

PAT (Basic Level) Practice (Chinese) 1051 complex multiplication (15 minutes) (Java implementation)

Title Description: The complex number can be written as the general form of (A+Bi)(A+Bi)(A+Bi) (a + bi) (a + bi), in which AAA is the real part, BBB is the virtual part, I I I is the unit of imaginary number, satisfying I2 = − 1i^2 = − 1i2 = − 1i2 = − 1i2 = − 1i2 = &minus ...

Posted by klevis miho on Wed, 23 Oct 2019 21:30:41 +0200