Java Description Design Mode (13): Iterator Mode

Source code for this article: GitHub. Click here || GitEE. Click here I. Iterator Mode 1. Basic concepts Iterator mode, also known as cursor mode, is the behavior mode of objects.Iterator patterns can sequentially access elements in a cluster without exposing the internal representation of the cluster. 2. Pattern Diagram 3. Core Role Iterat ...

Posted by banks1850 on Sun, 22 Sep 2019 17:43:16 -0700

Introduction to Java Synchronizer

Catalog Synchronizer Introduction to AbstractOwnable Synchronizer Class AbstractQueuedSynchronizer Introduction to the Implementation of AbstractQueued Synchronizer Subclass tryAcquire tryRelease Synchronizer Synchronizer provides a series of functions such as thread synchronization, mutual ...

Posted by nbarone on Wed, 18 Sep 2019 06:59:31 -0700

A Brief Talk on prototype Prototype Model

I. Introduction of Prototype Patterns Prototype pattern is an object creation pattern. It uses the method of replicating prototype objects to create instances of objects. Instances created using prototype patterns have the same data as prototypes. The characteristics of the prototype model: 1. Create the target object by the prototype ob ...

Posted by desmortes on Wed, 18 Sep 2019 00:52:27 -0700

Docker Container Series Articles Docker file of Docker Container Technology

Previously, the relevant articles are as follows: Docker Container Series Introduction to Docker Technology (1) Docker Container Series Introduction to Docker Technology (II) Docker Container Series: How many of these 20 Docker Command s do you know? A Brief Introduction to Docker file Docker can use the content of Dockerfile to automatically b ...

Posted by pjsteinfort on Wed, 18 Sep 2019 00:18:47 -0700

Introduction to Spring Series__04AOP

AOP introduction Let me introduce AOP today. AOP, which is often translated as "Face-Oriented Programming" in Chinese, is an extension of OOP. Its idea is not only applied in Spring, but also a good design method. Usually, a software syst ...

Posted by jeppers on Tue, 17 Sep 2019 00:02:29 -0700

SpringBoot implements distributed session

Implement distributed session Implement redis-based distributed session principle Replace the Session implementation class obtained from request based on HttpRequestWapper by providing a Session implementation class that gets data from redis rely on Introduce spring-boot-starter-data-redis, spring-session-data-redis; Introducing kr ...

Posted by frosero on Sun, 15 Sep 2019 19:15:18 -0700

Different implementations of dynamic proxies

Dynamic Proxy Implementation 1.JDK Dynamic Proxy jdk dynamic proxy implementation steps: Premise: jdk dynamic proxy has restrictions, the target object of proxy must implement interface Implementation: Using reflection API implementation, the specific implementation principle is not explained in detail here, only the implementation of dynam ...

Posted by henryblake1979 on Sat, 14 Sep 2019 09:40:20 -0700

Analysis of ThreadGroup Class in Java

The ThreadGroup class is used in Java to represent a thread group, representing a set of threads, which can be managed by a group of threads and thread groups. Threads can be attributed to a thread group, which can have thread objects, thread groups and threads. Such an organization structure is somewhat similar to that of a tree, as shown in t ...

Posted by jredsmyth on Thu, 12 Sep 2019 01:54:11 -0700

Summary of Load Balancing Algorithms

Summary of Load Balancing Algorithms Stochastic algorithm Firstly, the server is put into an array or a list, and a subscript within the valid range of the array is obtained through the random algorithm of JDK. According to the random subscript, the corresponding server is accessed. From the theory of probability and statistics, we can know tha ...

Posted by cdc5205 on Wed, 11 Sep 2019 21:08:11 -0700

Several implementations of Java Proxy design pattern

Proxy is a structural design model that mainly solves the problems caused by direct object access. Proxy is divided into static proxy and dynamic proxy (JDK proxy and CGLIB proxy).Static proxy: Proxy classes created by programs, or specific tool classes, are often used in normal development. This kind of proxy mode usually generates correspondi ...

Posted by dhrosti on Mon, 09 Sep 2019 19:15:43 -0700