ThreadLocal and strong weak virtual reference in multithreaded learning note 5

ThreadLocal There is a Map in ThreadLocal, which maintains a copy for each thread to ensure that the data in each thread is isolated. Let's look at a small program public class ThreadLocalDemo { static Person p = new Person(); public static void main(String[] args) { new Thread(() -& ...

Posted by Helaman on Tue, 21 Jan 2020 03:26:22 -0800

6, Garbage collection of JVM

GC log -Xmx1024m -Xms1024m -XX:+PrintGCDetails Heap PSYoungGen total 305664K, used 26214K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000) eden space 262144K, 10% used [0x00000000eab00000,0x00000000ec499be8,0x00000000fab00000) from space 43520K, 0% used [0x00000000fd580000,0x00000000fd580000,0x0000000100000000) to space 43520K, 0% ...

Posted by beyzad on Mon, 20 Jan 2020 22:25:14 -0800

Calling annotated methods through reflection

When I was learning Spring Aop, I learned that the underlying implementation of spring is basically annotation plus reflection.It's like writing your own very small test code and trying it out.But there are some minor episodes in the process.   I want to invoke the @Tag marked part of the method he ...

Posted by Brentley_11 on Mon, 20 Jan 2020 19:14:24 -0800

java learning notes -- inner class and Object root class

Inner class and Object root class Article directory Inner class and Object root class Inner class General internal class Characteristics of inner class Anonymous Inner Class Object Object overview Basic method Inner class Inner class simply use the inner class is the inner class. Locat ...

Posted by Sherman on Mon, 20 Jan 2020 04:40:17 -0800

Deep understanding of JVM class loading mechanism

Class loading process A type starts from being loaded into the memory of the virtual machine and ends at being unloaded. Its whole life cycle will go through seven stages: Loading, Verification, Preparation, Resolution, Initialization, Using and Unloading Collectively referred to as Linking, as shown in the figure: The order of loading, verify ...

Posted by sulin on Mon, 20 Jan 2020 03:17:20 -0800

Summary of JAVA concurrent synchronization and mutual exclusion

We all know that locking is an effective means to prevent the same resource from being preempted by multiple parties in the concurrent situation. Locking is actually synchronous mutual exclusion (or exclusive). That is to say, no matter how many concurrent requests there are at the same time, only one can handle them, and the rest can either w ...

Posted by Revlet on Sun, 19 Jan 2020 21:05:45 -0800

Flink of big data learning

Catalog   1: Introduction 2: Why Flink 3: What industries need 4: Features of Flink 5: The difference with sparkStreaming 6: Preliminary development 7: Flink configuration description Eight: Environment 9: Running components 1: Introduction Flink is a framework and distributed com ...

Posted by stodge on Fri, 17 Jan 2020 01:18:24 -0800

Java JVM analyzes the essence of overloading and rewriting from the perspective of method call

Original source of column: github - source note file ,github source code , welcome Star, please attach the original source link and this statement. Java JVM - virtual machine column series notes, system learning can access personal copy notes - Technology Blog Java JVM virtual machine I. Preface ...

Posted by bruceleejr on Wed, 15 Jan 2020 04:18:10 -0800

What is the effect of volatile keyword modification on objects?

If volatile modifies an object variable of reference type, will some of the common global variables defined in the object be affected by the effect of the volatile keyword? Next, let's analyze this problem together! Let's review the role of the volatile keyword through an example first! public class VolatitleFoo { //Class variable fin ...

Posted by saleemshehzad on Wed, 08 Jan 2020 08:39:26 -0800

JAVA Thread & ThreadLocal

Note: Based on jdk11 Thread Thread is a thread executed in a program. The JVM allows multiple threads in an application to execute concurrently. Each thread has a priority, and the high priority thread is better than the low priority thread. At the same time, threads can also be marked as daemons. When a thread is created, the priority is equa ...

Posted by beginneratphp on Wed, 08 Jan 2020 00:36:31 -0800