Source code analysis of ConcurrentHashMap

Let's not fight bald old today. Recharge ourselves and fight bald old again in the future! Note: the concurrent HashMap chat is after 1.8! Brothers and sisters all say that HashMap thread is not safe. If you want thread safety, use ConcurrentHashMap. Then why is it thread safe? Ah? Why? Don't think about it. It must look like it from the put( ...

Added by mjdamato on Wed, 05 Jan 2022 01:11:24 +0200

JavaWeb - Servlet (the most detailed tutorial in the whole network includes Servlet source code analysis)

preface I feel worthy of [the most detailed tutorial of the whole network, including Servlet source code analysis]. I'll check it myself and share it with you. JavaWeb-Servlet Animation demonstration of Tomcat working mechanism (click the moving picture to watch it in full screen) What is a Servlet     Servlet (Server ...

Added by jsucupira on Tue, 04 Jan 2022 15:55:27 +0200

[learning redis source code] the "message queue" Stream in redis

About redis Stream redis stream implements most of the functions of message queues, including: news ID Serialization generation of Message traversal Blocking and non blocking reads of messages Packet consumption of messages ACK Confirmation mechanism After this combination, I realized that I didn't know the message queue. You can t ...

Added by torsoboy on Mon, 03 Jan 2022 13:09:39 +0200

[protobuf source code exploration] coding and serialization

Why write this? I've wanted to write it for a long time, but there is a series of redis source code learning in front of me, which has been dragging on. When I was studying protobuf, I saw a blog on the Internet. It was very good, but it was inserted as follows: fixed focuses on time and int focuses on space compared with int. So if you ...

Added by DoD on Mon, 03 Jan 2022 03:18:49 +0200

The little-known details in the IoC container of Spring's core principles

This article is excerpted from Spring 5 core principles The Spring IoC container also has some advanced features, such as pre initializing beans using the lazy init attribute, generating or modifying Bean objects using factorybeans, and managing Bean declaration cycle events using the BeanPostProcessor post processor during Bean initialization ...

Added by tippy_102 on Sat, 01 Jan 2022 17:20:58 +0200

ConsumeQueue of RocketMQ storage

1, Function overview As an important part of RocketMQ storage implementation, ConsumeQueue provides the index function of message storage in each Queue under each Topic. In other words, each Queue under each Topic will have a ConsumeQueue to save the messages under the Queue in the CommitLog location. Like CommitLog, ConsumeQueue is implemente ...

Added by Nandini on Fri, 31 Dec 2021 21:42:04 +0200

Write a Spring framework with 300 lines of code. Although the sparrow is small, it has five dirty parts

This article is excerpted from Spring 5 core principles 1 custom configuration 1.1 configure application Properties file For the convenience of parsing, we use application Properties instead of application XML file. The specific configuration contents are as follows: scanPackage=com.tom.demo 1.2 configuring web XML file As we all know, all ...

Added by krio on Fri, 31 Dec 2021 01:09:32 +0200

Spring Interview Requirements-Circular Dependency

1. What is circular dependency 1.1 Overview Circular dependency is the interdependence between different objects. For example, A-like constructors depend on B instances, B-like constructors depend on A instances, so Spring needs to inject B instances when initializing A instances, then B instances need to be taken from containers, then B inst ...

Added by gfoot on Thu, 30 Dec 2021 18:06:39 +0200

Interpretation of ConfigurationClassPostProcessor class of Spring source code

catalogue 1. postProcessBeanDefinitionRegistry() (1) @ Conditional annotation parsing (2) Parsing of @ Component, @ ComponentScan, @ Import, @ ImportSource and other annotations a. @Component, @ ComponentScan, @ Import, @ ImportSource resolution b. @Configuration resolution c. @ComponentScans parsing d. Internal class processing d. @Pro ...

Added by Person on Tue, 28 Dec 2021 04:08:31 +0200

Initial experience of IoC container based on Spring core principles

This article is excerpted from Spring 5 core principles1 basic concepts of IOC and DIIoC (Inversion of Control) is to create, rely on and reverse the objects to be implemented in the original code to the container for implementation. We need to create a container and a description to let the container know the relationship between the object to ...

Added by realmxofxnoise on Sat, 25 Dec 2021 09:03:04 +0200