The magic of strong and weak references in java

Preface Under what circumstances might ThreadLocal have a memory leak?If you want to understand the context of this problem, it is essential to look at the source code. After looking at the source code, you find that static class Entry extends WeakReference <ThreadLocal<?> {} is actually used in ThreadLocal, and the puzzle is actually ...

Added by JoeZ on Sat, 27 Jun 2020 22:59:49 +0300

Alipay app payment server access (certificate mode)

Alipay has paid a lot of access documents. Because of the key configuration error, it has been returning to the 4000 error code for a half afternoon. The overall development flow chart is as follows: 1. First create the APP and sign the APP payment capability Official documents: Preparation befo ...

Added by dujed on Sat, 27 Jun 2020 08:18:19 +0300

Java multithreading basic producers and consumers

Java multithreading Foundation (12) producers and consumers 1, Producer and consumer model The problem of producer and consumer is a typical multithreading problem, which involves "producer", "consumer", "warehouse" and "product". Their relationship is as follows: ① The producer only produces when the ...

Added by robburne on Fri, 26 Jun 2020 09:26:30 +0300

Microservice - call of service

typora-copy-images-to: imgs Call between microservices 1. Call of microservice - Ribbon + resttemplate (independent component) 1. What makes Ribbon Ribbon is a client-side load balancer, which is used to call the load balancing of microservices between spring cloud 2. Load balancing between se ...

Added by PcGeniusProductions on Fri, 26 Jun 2020 09:14:44 +0300

The Ultimate Perfect Shopping Cart System Reveals--MVC Design Mode

Simple Shopping System People often go online to get enough, so the so-called shopping cart on the Internet should not be unfamiliar, so today we use the MVC design mode of javaweb to implement a case of online shopping system. The results are as follows:   A brief introduction to the three-tier architecture 1. Development Steps ...

Added by NogDog on Fri, 26 Jun 2020 04:41:02 +0300

Redis from entry to mastery (VIII. Redis cluster)

This article introduces the Redis Cluster cluster, and briefly introduces the implementation of the cluster. It is mainly a specific practical part: cluster startup, failover, adding nodes, removing nodes Basic concepts of Redis cluster Redis's cluster mode provides data fragmentation and ensures the availability of each partition. Each node of ...

Added by jdorsch on Thu, 25 Jun 2020 14:10:22 +0300

Distributed timing task -- XXL job learning: source code analysis -- actuator startup process

Distributed timing task -- XXL job learning (2): source code analysis -- actuator startup process preface 1, Start of actuator 1.1 analysis of the core class XxlJobSpringExecutor 1.1.1 initJobHandlerRepository() 1.1.2 initJobHandlerMethodRepository() 1.1.3 GlueFactory.refreshInstance(1) 1.1.4 super.start() ...

Added by Azad on Thu, 25 Jun 2020 05:17:05 +0300

Finding a few small math problems for ReentrantReadWriteLock is enough

Preface Article Java AQS Queue Synchronizer and ReentrantLock Application This paper introduces the implementation of AQS exclusive acquisition of synchronization state, and illustrates how ReentrantLock customizes synchronizer mutually exclusive lock. Article Java AQS Shared Obtain Synchronization Status and Semaphore Application Analysis In ...

Added by hank9481 on Wed, 24 Jun 2020 05:01:25 +0300

spring boot source parsing and startup process

First of all, spring boot is a simplified development framework with convention greater than configuration. If I look at the source code of spring boot, I think there are two directions. One is the process of spring boot based on spring container and some of its own startup. The other is the implemen ...

Added by PHPLRNR on Tue, 23 Jun 2020 08:49:04 +0300

"python" Object-Oriented Introduction (with diagram) in detail

Article catalog object-oriented Defining classes Define a class and create a class instance Binding instance properties for objects Creating and using instance methods Class properties Class method Static class method Construction method encapsulation General definition method: lack of concealmen ...

Added by CompuWorld on Tue, 23 Jun 2020 08:48:35 +0300