Various locks in java

Pessimistic lock: pessimistic lock pessimistically believes that every operation will cause the loss of updates, and an exclusive lock is added every time. Every time I go to get the data, I think others will modify it, so every time I get the data, I will lock it. In this way, if others want to get the data, they will block it until it gets t ...

Added by poknam on Wed, 09 Mar 2022 17:15:24 +0200

Reading Flink source code and talking about design: clean architecture in FileSystemConnector

This article was first published in Floating finch language:https://www.yuque.com/17singeditiondateremarks1.02022.3.8Article launchThis paper analyzes the code based on Flink 1.14.0. PrefaceA while ago, I encountered a strange phenomenon in production: the full-scale operation cannot be carried out normally, and the log is full of Java util. co ...

Added by nyfael on Wed, 09 Mar 2022 02:03:12 +0200

Online fault - CPU soared high

High CPU of application service caused by serialization problem The phenomenon of CPU soaring is very common, but in fact, it is not particularly complex to find and solve it. Here are some common cases of CPU soaring, and the solutions and relevant troubleshooting and solving processes are given. Before analysis, review several knowledge ...

Added by freddyw on Sun, 06 Mar 2022 15:31:13 +0200

Instant messaging: server springboot + netty socket IO, client socket io. JS + java socket io-client

Introduction: server springboot + netty socket IO, client socket io. JS + java socket io-client Based on socket io: Server use netty-socketioClient use socket.io-client-java Scenario Description: by integrating the XXL job distributed scheduling platform, set the cron time expression, turn on the job task polling mode, and regularly schedu ...

Added by yumico23 on Thu, 03 Mar 2022 18:09:12 +0200

Glide's caching mechanism

Glide's cache is divided into two modules, one is memory cache and the other is hard disk cache. The function of memory cache is to prevent duplicate data from being read; The function of hard disk cache is to prevent applications from repeatedly downloading and reading data from the network or other places. Cache Key of Glide The code that ...

Added by davidprogramer on Sun, 27 Feb 2022 23:38:07 +0200

DataBinding in Android Jetpack binds the layout view to the architecture component

Binding layout views to schema components The AndroidX library contains architecture components, which can be used to design reliable, testable and maintainable applications. The data binding library can work seamlessly with architecture components to further simplify the development of the interface. The layout in the application can be ...

Added by TimC on Sat, 26 Feb 2022 12:25:41 +0200

Spring MVC is the way of JAVA architecture. Master spring MVC easily.

1. Text 1. What is MVC architecture? 2. What is the spring MVC framework? 3. Why use spring MVC architecture? 4. Quick start spring MVC? 5. The process of spring MVC. 6. How spring MVC accepts the requested parameters. 7. How does spring MVC forward the parameters of the control layer to the front-end page? 2. What is MVC architecture? ...

Added by MikeTyler on Sat, 26 Feb 2022 09:27:00 +0200

MongoDB entry practice - Installation

This article mainly introduces the installation of MongoDB and the software versions used: MongoDB 5.0.5 and Centos 7.6. 1. Stand alone installation 1.1. Download and unzip MongoDB Download address: https://www.mongodb.com/try/download/community Decompression: tar zxvf mongodb Linux x86_ 64-rhel70-5.0.5. tgz 1.2. Create data and log direct ...

Added by Jamesm on Sat, 26 Feb 2022 08:55:06 +0200

Implementation of skynet timer

I Data structure of timer skynet timer uses a timer data structure to save data, as follows: struct timer { struct link_list near[TIME_NEAR]; //The event queue closest to the current time is retrieved from this queue every time a tick is made struct link_list t[4][TIME_LEVEL]; //An event queue that is far from the current t ...

Added by ojav on Fri, 25 Feb 2022 10:49:43 +0200

Spring Boot learning notes for beginners

Spring Boot is a new development framework under the spring family. Its design purpose is mainly to simplify the creation and development process of spring applications. It provides features such as automatic configuration and starter dependency, so as to free developers from a large number of XML configurations. Spring Boot is committed to bec ...

Added by wwfc_barmy_army on Thu, 24 Feb 2022 10:55:06 +0200