Java Description Design Mode (01): Single Case Mode

1. Single Case Mode 1. Conceptual illustrations Singleton Design Mode Definition: Ensure that this class has only one instance and that automatic instantiation provides this object to the system. 2. Sample Code package com.model.test; public class Singleton { // Recording unique instances using static variables private static Singleton ...

Posted by yogibear333 on Fri, 23 Aug 2019 17:38:34 -0700

Java Agent-based Full Link Monitoring II "Increasing Monitoring Execution Time by Bytecode"

Chapter List | Focus on Wechat Public Number, bugstack wormhole stack, reply to <Java Agent-based Full Link Monitoring> Get Source Code Java Agent-based full-link monitoring Java Agent Java Agent-based Full Link Monitoring II "Increasing ...

Posted by ali_p on Fri, 23 Aug 2019 04:48:11 -0700

Hand tear ThreadPool Executor thread pool source code

This article gives a detailed analysis of how ThreadPool Executor creates thread pools to operate thread lifecycles through source code. By explaining execute method, addWorker method, Worker class, runWorker method, getTask method and processWorkerExit from the source code point of view, there are colored eggs at the end of the article. Exexct ...

Posted by stb74 on Sun, 18 Aug 2019 07:56:52 -0700

javaagent usage guide

Today I'm going to write about Java agent. At first, I'm not familiar with the concept of Java agent. Later, I heard bytecode stuffing in other people's population. After bTrace and Arthas, I gradually realized that Java also provides such a tool. ...

Posted by Azarath on Sat, 17 Aug 2019 00:12:32 -0700

Optimized compression of 20M files from 30 seconds to 1 second

There is a requirement to send 10 photos from the front end, then process them in the back end and compress them into a compressed package for output through network streaming.I haven't touched Java compressed files before, so I went online to find an example to change it. It can also be used after changing. But as the size of the pictures uplo ...

Posted by ade1982 on Thu, 15 Aug 2019 21:19:54 -0700

Record a production on-line problem

Yesterday the project came online, and after verification, I took a deep breath and went online perfectly without any problems.However, half an hour later, I received an alert from the Operations and Maintenance Team that several ports of a serve ...

Posted by Pavel_Nedved on Thu, 15 Aug 2019 20:27:06 -0700

Deep Understanding of Java Virtual Machines - How do Java virtual machines load Java classes?

How do Java virtual machines load Java classes? This is the Java class loading mechanism that is often asked in interviews. After the interview at the beginning of the year, the newbie magpie can also reverse this process. However, it's just a literal recitation, just like an endorsement test in school. tonight! Let's map it to the real world ...

Posted by stolzyboy on Thu, 15 Aug 2019 08:49:52 -0700

Why can Spring MVC get the method parameter name, but MyBatis can't? [Enjoy Spring MVC]

Every sentence Hu Shi: Talk more about problems and less about doctrine Preface Spring MVC and MyBatis are the two most popular frameworks at present, which are used in the development of daily life. If you take a step further to think, you should have such questions: When using Spring MVC, you can automatically encapsulate values as long as ...

Posted by jdog5 on Thu, 15 Aug 2019 07:47:54 -0700

Class Loader-Reflection-Modularization

1. Class loader Class 1.1 Loading [Understanding] Description of Class Loading When a program wants to use a class, if the class has not been loaded into memory, the system will initialize the class through three steps: class loading, class con ...

Posted by smilesmita on Thu, 15 Aug 2019 04:27:54 -0700

[Learning Notes-Java Collection-6] WeakHashMap Source Code Analysis

introduce WeakHashMap is a kind of weak reference map. The internal keys are stored as weak references. When jvm gc does not exist strong references, these keys will be recycled by gc. The next time we operate a map, the corresponding Entry will be deleted. Based on this feature, WeakHashMap is especially suitable for cache processing. Inherita ...

Posted by Bit343 on Wed, 14 Aug 2019 00:44:05 -0700