Deep Understanding of JVM03 - Virtual Machine Performance Monitoring and Fault Handling Tool

"🙊🙊🙊This tutorial is experimental and unsupported." Classic Answer to Last Homework Question: What are the common garbage collectors in Java? In fact, Garbage Collector is closely related to specific JVM implementations. Different vendors (IBM, Oracle) and different versions of JVM offer different choices. Next, let me talk ab ...

Posted by Swede78 on Fri, 17 May 2019 10:33:40 -0700

ThreadPool Executor Source Analysis Learning for Java Concurrent Thread Pool

Thread pool learning All the following contents and source code analysis are based on JDK 1.8, please know. My blog is really out of order, which may be related to my learning style. I think it's not good for me, but I can't convince myself to change, so I can only think about what to learn. Pooling technology is really a very powerful techno ...

Posted by lovelf on Fri, 17 May 2019 05:22:00 -0700

Advanced usage of sorting from zero-row single-row Java 8-List in conjunction with Lambdas

brief introduction In this tutorial, we will first learn about Lambda support in Java 8, especially how to use it to write Comparator s and sort Collection s. First, let's define a simple entity class: public class Human { private String name; private int age; } Simple sorting of lists Prior to Java 8, sorting collections would involve ...

Posted by nutshell on Thu, 16 May 2019 21:34:42 -0700

Mongo Connection Analysis

abstract In the previous article, we have analyzed the connection of relational database and the principle of connection pool. In the Mongo database also exists, we often see some netizens asking Mongo to connect to the database or not, how to close. Whether the built-in database connection pool is single-threaded or multi-thr ...

Posted by Jeremiah on Thu, 16 May 2019 04:46:46 -0700

[Java] AQS Source Code Analysis

The full name of AQS is AbstractQueued Synchronizer, which is a synchronizer design framework provided by JDK. Many concurrent data structures, such as ReentrantLock, ReentrantReadWriteLock, Semaphore and so on, are implemented based on AQS. Next, the principle of AQS is analyzed.   I. underlying data structure The AQS under ...

Posted by giraffemedia on Wed, 15 May 2019 16:13:37 -0700

AQS Synchronization Component--ReentrantLock and Lock

ReentrantLock and Lock Synchronized and ReentrantLock are different Reentrant: Both are reentrant Lock implementation: Synchronized is implemented by jvm, and ReentrantLock is implemented by jdk.(We can understand that one implementation is at the operating system level and the other is at the user's own level.) The implementation of Synchroni ...

Posted by The Bat on Wed, 15 May 2019 01:36:09 -0700

Extension mechanism of HashMap and why the default size is 2 power

Put Method of HashMap The data structure design of HashMap can be referred to. link . Next, we review the put(Key k, Value v) process of HashMap: (1) Hash value is calculated for Key, hash table subscript is calculated, corresponding to hashCode() method, so when class object is used as Key, the hashCode() method and equals() method of the o ...

Posted by coderWil on Sun, 12 May 2019 02:22:09 -0700

JAVA concurrent programming: CAS and AQS

When it comes to JAVA concurrent programming, you have to talk about CAS(Compare And Swap) and AQS (AbstractQueued Synchronizer). CAS(Compare And Swap) What is CAS? CAS(Compare And Swap), that is, compare and exchange. CAS operation consists of three operands: memory location (V), expected original value (A) and new value ( ...

Posted by TGLMan on Sun, 12 May 2019 00:41:42 -0700

Design Principle of Source Code-Feign for Java B2C Springboot Electronic Commerce Platform

What is Feign? Feign is a lightweight framework for HTTP request invocation. It can invoke Http requests in the way of Java interface annotations, instead of directly invoking them by encapsulating HTTP request messages in Java. Feign templates requests by processing annotations. When actually invoked, parameters are passed in, and then applied ...

Posted by Jessup on Sat, 11 May 2019 11:31:42 -0700

Supplement to Java List Container Source Analysis

Previously, we learned how to use ArrayList and LinkedList by analyzing the source code.However, in addition to analyzing the source code, it is always necessary to go online to look for some relevant information, stand on the shoulders of previous people, and find that there are more or less omissions in the first two articles, such as Vector, ...

Posted by Thoughtless on Sat, 11 May 2019 08:41:28 -0700