Design Patterns - Agent Patterns
Definition of proxy pattern: The proxy pattern provides a proxy object for an object, and the proxy object controls the reference of the original object. For example, one person or institution acts on behalf of another person or institution. In some cases, a client does not want or can not directly refer to an object, while a proxy object c ...
Posted by themaxx113 on Sun, 19 May 2019 20:06:12 -0700
Multithread, it's so simple!
This article belongs to xxKarina Original, reproduced please note
Personal blog address: https://xxkarina.github.io/
Essentials
What is a thread?
What are threads?
How to Use Threads
What are threads?
To learn threads, we first need to understand several common concepts:
process Every program running on the system is a process. A proc ...
Posted by mrherman on Sun, 19 May 2019 19:09:29 -0700
Java programs deploy settings related to CPU and MMORY resource constraints in K8S containers
background
Execute Java programs in the k8s docker environment, because we set the limit of cpu, memory, so the parameters of the JVM are not associated with the parameters we set when the Java program executes, resulting in the CPU and memory that the JVM perceives as the size of the CPU and memory on our k8s work node.The problem with this is ...
Posted by dirty_n4ppy on Sun, 19 May 2019 10:16:36 -0700
Java Strong Reference|Soft Reference|Weak Reference|Virtual Reference
Due to the existence of GC auto-recycling mechanism in Java, the mechanism of reference counting is relatively perfect. Java divides the references of holding objects into strong references, soft references, weak references, virtual references in order of strength and weakness. Good use of references allows GC to quickly recycl ...
Posted by weekenthe9 on Sun, 19 May 2019 09:22:04 -0700
java Language Advancement and Android Principle Kernel; Detailed Notes on Generic Principles
Preface;
java knowledge is the language foundation for Android development. Although kotlin has been introduced before, we still need to master java well for the following reasons:
1) SDK or java, kotlin also needs to be compiled to run in java;
2) At present, a large number of third-party libraries and inherited and predecessor c ...
Posted by Aureole on Fri, 17 May 2019 22:59:51 -0700
Netty4 (8): ByteBuf Details
What is ByteBuf?
The Java NIO provides the ByteBuffer class as a byte buffer, but the use of ByteBuffer is complex, especially requiring flip() to switch between read and write
So Netty redesigned a byte buffer ByteBuf with the following features:
Extensibility
Defines read and write indexes, so flip() switching is not required f ...
Posted by caminator on Fri, 17 May 2019 23:00:27 -0700
Deep Understanding of JVM03 - Virtual Machine Performance Monitoring and Fault Handling Tool
"๐๐๐This tutorial is experimental and unsupported."
Classic Answer to Last Homework
Question: What are the common garbage collectors in Java?
In fact, Garbage Collector is closely related to specific JVM implementations. Different vendors (IBM, Oracle) and different versions of JVM offer different choices. Next, let me talk ab ...
Posted by Swede78 on Fri, 17 May 2019 10:33:40 -0700
com.alibaba.fastjson.JSONException: create asm serializer error
When the log plug-in, a function is to print the log file function, debugging today, encountered the above exception, record the investigation process and solutions.
The problem lies in calling the following methods:
this.processSysLog(log, syslog, JSON.toJSONString(result));
The JSON. to JSONString (Object object) exception r ...
Posted by mattcass on Thu, 16 May 2019 04:25:02 -0700
Distributed project consul service registration and discovery
When it comes to distributed nature, we need to talk about distributed and microservices.
Microsoft service is a way of software architecture, or a style of structure design. It is not a standard. Its logic is to split an entire service into separate services by business, reduce service dependency, and eliminate server message-driven. Common ex ...
Posted by easmith on Wed, 15 May 2019 23:13:03 -0700
Talk about jest's Node Checker
order
This article mainly studies jest's Node Checker.
NodeChecker
jest-common-6.3.1-sources.jar!/io/searchbox/client/config/discovery/NodeChecker.java
public class NodeChecker extends AbstractScheduledService {
private final static Logger log = LoggerFactory.getLogger(NodeChecker.class);
private final static String PUBLISH_ADDRESS_KEY ...
Posted by boby on Wed, 15 May 2019 09:03:17 -0700