[java] ConcurrentHashMap1.7 source code details

Catalog Preface HashTable and ConcurrentHashMap data structure Class Segment attribute put(K key, int hash, V value, boolean onlyIfAbsent) remove(Object key, int hash, Object value) Class HashEntry attribute Construction method Core method put(K key, V value) get(Object key) size() remove(Object k ...

Posted by juancarlosc on Wed, 15 Jan 2020 23:15:36 -0800

How do beanautils copy lists?

Background We may often transform data between DO, Model, VO layer data: Entity corresponds to the data structure of persistence layer (generally the mapping model of database table); The Model corresponds to the data structure of the business layer; VO is the data structure that the Controller interacts with the client. For example ...

Posted by smook on Wed, 15 Jan 2020 00:22:10 -0800

Why to override the hashCode method when overriding the equals method

I use jdk version 1.8. hashCode is a local method in the Object class, which means that all objects inherit its hashCode method. Without much nonsense, let's first look at the introduction of hashCode method in the Object class: /** * Returns a hash code value for the object. This method is ...

Posted by vexx on Mon, 13 Jan 2020 02:06:07 -0800

Install JDK under centos 7.x for Tool Man Series, summarizing in more detail

Step 1: Check the JDK View the JDK version and type: java-version on the command line [root@test ~]# java -version bash: java: command not found As above, prove that your linux is very clean, go directly to Step 2 Or the following [root@test ~]# java -version openjdk version "1.8.0_102" OpenJDK Runtime Environment (build 1.8.0_102-b14) OpenJD ...

Posted by Cruzado_Mainfrm on Sun, 12 Jan 2020 09:33:43 -0800

java Performance Analysis - CPU Speed Analysis Tool

background Students who have handled production problems can almost always encounter sudden slowness of the system, sudden surge of CPU, or even unavailability of the entire application request.When this happens, we should export the jstack and memory information as soon as possible without affecting the accuracy of the data, then restart the s ...

Posted by vickyjackson on Sun, 12 Jan 2020 08:33:40 -0800

SPI Adaptive Extended Adaptive Principle for Dubbo Source Analysis 2

Catalog Principle overview Why design the @Adaptive annotation Where, when and how dubbo source is used Source Code Analysis for @Adaptive Extension Loading Process summary Principle overview First, look at the description of adaptive scaling on the following website: In Dubbo, many extensions are l ...

Posted by robot43298 on Sat, 11 Jan 2020 16:43:24 -0800

Installation and configuration of Jetty under Linux

Jetty introduction Jetty is an open source servlet container that provides a runtime environment for Java based web content, such as JSP S and servlets. Jetty is written in the Java language, and its API is published as a set of JAR packages. Developers can instantiate the jetty container into an object, which ...

Posted by rix on Mon, 06 Jan 2020 16:57:05 -0800

Automatic construction of Gradle (I) Groovy

Official website: http://groovy-lang.org/ DSL: domain specific language Groovy is a branch of DSL, others are like uml sml xml html Features: solve the problems in a specific field, compile the fields not involved in the language, combine the compiled language, and improve the development of the project Groovy : It i ...

Posted by JUMC_Webmaster on Sun, 05 Jan 2020 08:24:21 -0800

Implement RPC service call framework by yourself

Reprint RPC of TCP Introduction In this paper, a simple rpc call framework is implemented by using socket programming of java. It is composed of two projects named batchake provider (service provider) and batchake consumer (service caller). The design idea is as follows: 1. In the battery cake provider, write a service called battery cake serv ...

Posted by wiggst3r on Wed, 01 Jan 2020 00:37:47 -0800

Using Amoeba to realize the read-write separation configuration of database

I. Amoeba It can realize load balancing Read / write separation , high availability, etc. 1.1 installation of JDK (1) Upload JDK (2) Unzip [root@localhost java]# tar -xvf jdk-8u51-linux-x64.tar.gz  (3) Modify system environment variables [root@localhost java]# vim /etc/profile (4) Load JDK configuration [root@lo ...

Posted by cyandi_man on Mon, 30 Dec 2019 06:53:25 -0800