Design Mode Architecture - Agent Mode
1. Basic introduction of agent mode
Proxy mode provides a surrogate for an object to control its access.That is, the target object is accessed through the proxy mode.The advantage of this is that on the basis of the implementation of the target object, additional functional operations can be enhanced, that is, to extend the function of the ta ...
Posted by squimmy on Sun, 29 Dec 2019 10:48:47 -0800
Java Efficient Code 50 Cases
Reading Guide
There are only two substances in the world: high efficiency and low efficiency; there are only two kinds of people in the world: high efficiency and low efficiency.--Shaw
Constant-Variable
Assigning constants directly prohibits declaration of new objects
Assigning a constant value directly creates an object reference that points t ...
Posted by Shaba1 on Fri, 27 Dec 2019 20:53:05 -0800
How to restart Spring Scheduler gracefully
Timing task is a common function. In some cases, you need to restart or reset the Scheduler Job, but the official API does not provide a method similar to restart, so how to complete this requirement?
Spring Quartz
Spring Quartz(http://www.quartz-scheduler.org/documentation/ )It is a complete set of Cron Job architecture, which can complete com ...
Posted by Jasp182 on Wed, 25 Dec 2019 23:52:08 -0800
I see the basic data types and encapsulation types of JAVA
Note: Based on jdk11 java provides 8 basic data types, including 1 Boolean type, 6 numeric types, and 1 character type.jdk also provides corresponding encapsulation types for the eight basic data types.
boolean & Boolean
boolean
1 bit in length
Data Range: Only two values true, false
Default value is false
Boolean
Encapsulation type ...
Posted by truckie2 on Tue, 24 Dec 2019 19:43:00 -0800
New features of JDK 1.8 - Lambda expression, Stream API, functional interface, method reference
jdk1.8 new feature knowledge points:
Lambda expression
Stream API
Functional interface
Method references and constructor calls
Default and static methods in the interface
New time date API
default
Lambda expression
Lambda is to simplify some of our previous complex codes, such as the judgment and comparison / sorting of colle ...
Posted by Pikachu2000 on Mon, 23 Dec 2019 08:34:34 -0800
Design pattern creation - singleton pattern
As a common design pattern, singleton pattern is not repeated here.
There are nine ways to implement singleton mode, but some of them are defective. In summary, there are four types:
1, Starved Han model
/**
* @ClassName: Singleton2
* @description: Singleton mode - starved mode (thread safe, but not resource efficient)
* @author: edison_Kwok ...
Posted by phpnewbie911 on Sun, 22 Dec 2019 06:11:59 -0800
Java -- Collection collection, iterator, generics
aggregate
——Collection is a container provided by java, which can be used to store multiple data.
The difference between set and array
The length of the array is fixed. The length of the set is variable.
The array stores elements of the same type, which can store basic data type values.
Collections store objects. And the ty ...
Posted by bakaneko on Sun, 22 Dec 2019 02:12:09 -0800
The most detailed HashTable source parsing ever, the easiest to understand
HashTable Source Analysis
For more resources and tutorials, please pay attention to the Public Number: Non-subject classes.If you think I can write, please give me a compliment. Thank you, your encouragement is the power of my creation.####1. PrefaceHashtable is an old-fashioned collection class that was born as early as JDK 1.0
####1.1. Sum ...
Posted by adam84 on Sat, 21 Dec 2019 13:07:42 -0800
Atomic issues with Java memory models
This blog series is a summary of the learning process of concurrent programming.Because there are many articles and the writing time is scattered, I organized a catalog paste (portal) for easy reference.
Concurrent Programming Series Blog Portal
Preface
As mentioned in previous articles, JMM is a reflection of the memory model specification in ...
Posted by wilded1 on Fri, 20 Dec 2019 22:45:08 -0800
Kubernetes+docker-DIY-kafka+zookeeper+manager cluster deployment
Foreword: Recent project of combining kafka and zookeeper containerization with rancher, I consulted related websites and books and found that there are many reasons why I chose to customize it if it is relatively strong to standardize the company. Let me briefly talk about the reasons why I chose to customize it finally: (Because k8s+kakfa te ...
Posted by harty83 on Fri, 20 Dec 2019 09:48:27 -0800