Concurrent HashMap for JDK Source Analysis (12)

This article will mainly talk about JDK version 1.8 Concurrent HashMap, its internal structure and many hash optimization algorithms are the same as JDK version 1.8 HashMap, so before reading this article, we must first understand HashMap, for reference. HashMap correlation In addition, there are also red and black trees in Concurrent HashMap, ...

Added by smokey20 on Fri, 17 May 2019 04:02:20 +0300

Farewell to Code Copy of Encryption and Decryption Module - JCE Core Cpiher Details

premise javax.crypto.Cipher, translated as a password, is actually better known as a crypto. Cipher is the core of JCA(Java Cryptographic Extension), which provides encryption and decryption functions based on a variety of encryption and decryption algorithms. Before we know Cipher, we always need to copy code everywhere when we complete some m ...

Added by saint4 on Fri, 17 May 2019 00:54:10 +0300

ThreadLocal Analysis of Java Multithreading

1. Understanding ThreadLocal ThreadLocal, also known as thread local variables or thread local storage. ThreadLocal creates a copy of the variable in each thread, so each thread can access its own internal copy variable. Let's start with an example: class ConnectionManager { private static Connection connect = null; ...

Added by nickk on Thu, 16 May 2019 22:35:21 +0300

Simple Use of Netty Framework to Realize socket Communication

As an aside, many people call the NIO provided by JDK 1.4 asynchronous non-blocking I/O; in fact, it is not. Strictly speaking, it can only be called non-blocking I/O. In NIO 2.0 provided by JDK 1.7, an asynchronous socket channel Channel is added, which is the real asynchronous non-blocking I/O. The following table com ...

Added by HyperD on Wed, 15 May 2019 16:44:34 +0300

Type type in Java

In Java, generics and reflection are two important concepts that we can almost always use. And when it comes to Type, if anyone is unfamiliar with it, we should all understand that it is a direct implementation class, Class. Type is the common parent interface of all types in the Java language. This article is mainly about t ...

Added by drath on Tue, 14 May 2019 19:10:44 +0300