Strong Reference/Soft Reference/Weak Reference/Virtual Reference and GC Policy in Java

Before introducing various references, let's briefly introduce garbage collection. What is garbage collection? Garbage Collection (GC), as its name implies, is to release the space occupied by garbage and prevent memory leakage. Effective use of the memory that can be used to clear and recycle objects that have been dead or not used for a long ...

Posted by ravi.kinjarapu on Wed, 09 Oct 2019 15:40:03 -0700

JAVA Network Programming and Classical Case Echo

Java's network concept is not distinguished by the host, but by the process. JVM helps to solve the network transmission without our consideration. Although JVM helps users hide the original information of the network, some operations are left to users. There are two kinds of network connections: TCP ...

Posted by t2birkey on Mon, 07 Oct 2019 17:57:51 -0700

Invokedynamic-Java's Secret Weapon

The earliest work on invokedynamic s dates back at least to 2007, and the first successful dynamic call was made on 26 August 2008. This was earlier than the acquisition of Sun by Oracle and has been developed for a long time according to the standards of most developers. The advantage of invokedynamic is that it is the first new bytecode since ...

Posted by Koobazaur on Mon, 07 Oct 2019 12:42:45 -0700

10. Introduction of Dubbo Services

1. Introduction of Dubbo Service Introduction The first two articles Export of Dubbo's Service Export 1 to Local,Export of Dubbo's Service Export 2 to Remote The process of service export is analyzed in detail. In this article, we will continue to analyze the Service Citation process. In Dubbo, we can refer to remote services in two ways. The f ...

Posted by rushenas on Sun, 06 Oct 2019 12:42:49 -0700

Using guava cache to cache hot data locally

Some hot data may be visited thousands of times in a short time, so besides placing it in redis, it can also be placed in local memory, which is JVM's memory. We can use google's guava cache component to implement local caching. We chose guava because it can control the size and timeout of key s and value s, configure LRU policies, and guava i ...

Posted by TropicalBeach on Wed, 02 Oct 2019 10:57:30 -0700

[Deep shallow-JVM] (77): SPI

concept Service Provider Interface rule Create a file named after the fully qualified interface name in resource/META-INF/services, and implement the fully qualified name of the class in the content Interface Implementation Class in classpath Path The main program loads the implementation module dynamically through java.util.Service Loader (sc ...

Posted by charlestide on Tue, 01 Oct 2019 16:27:35 -0700

The meaning of setting ConnectionTimeout and SetReadTimeout in jdk (in detail)

Let's start with an example. Client: package top.quartz.util; /** * description: //connect timeout Setting up connection timeout time; * //read timeout,Is the timeout for data transfer. * Both values must be set. If only one is set, either case will block. * Then the current application present ...

Posted by mediabox on Mon, 30 Sep 2019 06:25:26 -0700

Android implements hot repair based on DexClassLoader

This paper briefly introduces a kind of implementation of thermal repair, plug-in principle can also be referred to. Class Loader in Android System Android shields ClassLoader's findClass loading method, so how does it implement its own class loading? There are two classloaders in Android system: ...

Posted by phorcon3 on Thu, 26 Sep 2019 06:47:51 -0700

Deep into the jvm kernel - Principle, diagnosis and Optimization - 6. Class loader

class Loading Verification Process Load The first stage of loading classes Get the binary stream of the class Conversion to method area data structure Generate corresponding java.lang.Class objects in the Java heap link Verification Get ready analysis Initialization Execution class constructor < clinit > static ...

Posted by danf_1979 on Wed, 25 Sep 2019 00:07:43 -0700

Summary of the Ninth Day of High Intensity Learning and Training: Topics of Five Sword Fingers offer

I really don't want to see JVM anymore. Brush a few finger-to-finger questions on Offer. Let's have water today. My brain is confused. 1. Finding in two-dimensional arrays In a two-dimensional array (each one-dimensional array has the same length), each row is sorted in the order of increasing from left to right, and each column is sorted in t ...

Posted by amax on Mon, 23 Sep 2019 07:44:36 -0700