Spring boot configuration JVM cache
Cache classification: cache is divided into memory cache and JVM cache
Memory cache, such as redis
JVM cache is only used in java, and a single JVM is valid
Cache usage scenarios
Reduce database access pressure
Create the springboot project < this article configures the JVM cache >
Add cache dependency in pom.xml
...
Posted by micbox on Thu, 14 Nov 2019 16:06:48 +0100
Brain hole: byte code enhanced log collection scheme
background
Demand:java technology stack, to access all the current projects to the log center, the requirements seem relatively simple
But in the process of implementation, there are various problems, such as different departments, different development frameworks and different levels of personnel competence,
Scheme selection:
Each project ...
Posted by vahidi on Fri, 08 Nov 2019 09:32:26 +0100
Introduction to Java JVMTI and Instrumention mechanisms
Or look at the blog on my CSDN:https://blog.csdn.net/u013332124/article/details/88367630
1. Introduction to JVMTI
JVMTI (JVM Tool Interface) is a native programming interface provided by the Java virtual machine. It is an alternative version of JVMPI (Java Virtual Machine Profiler Interface) and JVMDI (Java Virtual Machine Debug Interface). ...
Posted by creative on Fri, 08 Nov 2019 03:49:03 +0100
Eureka Server prometheus monitoring service health status
background
The service process monitoring is generally handled by related components. In the early business, the DB resources used by specific services exceed the quota allocation, which leads to the failure of health detection. The services are successively offline from Eureka. When the service monitoring is not routed to a specific node, or r ...
Posted by gmbot on Sat, 02 Nov 2019 22:32:33 +0100
Java interface and exception experiment report
Task 1: suppose the default length unit is meters, write a program to calculate the cost of coloring various shapes.
Requirement:
Write the BorderColorable interface, which requires:
It has the method void paintBorder(), which needs to output "what shape's edge has been colored" in the impl ...
Posted by msk_1980 on Mon, 28 Oct 2019 03:06:22 +0100
Java 23 design patterns singleton pattern
Original address: https://zhuanlan.zhihu.com/p/...
I. overview
1. What is the singleton mode?
Baidu Encyclopedia is defined as follows: single instance mode is a common software design mode. In its core structure, there is only one special class called singleton. Single instance mode can ensure that there is only one instance of a class in the ...
Posted by speckledapple on Mon, 28 Oct 2019 02:00:33 +0100
JVM core knowledge class loading mechanism
The life cycle of a class in a JVM includes seven stages: loading, preparing, validating, parsing, initializing, using, and unloading. Among them, preparation, verification and resolution are classified as connection stage.
Load
What the jvm does at this stage
Get the binary byte stream of the class by the class name
Convert the static s ...
Posted by llanitedave on Wed, 23 Oct 2019 12:48:57 +0200
Four references in Java
We mentioned GC before, but when more and more objects are referenced in Java, there will be insufficient memory space, resulting in the error OutOfMemoryError and application termination. So why can't GC collect more objects at this time? This is related to the reference types mentioned today.<!-- more -->
First of all, starting from JDK ...
Posted by betman_kizo on Tue, 22 Oct 2019 06:42:12 +0200
[Java Concurrency] Foundation
I. overview
1.1 Thread and Process Differences
Performance issues caused by 1.2 multithreading
2. Multithread Creation
2.1 First type - inheritance of Thread class
2.2 the second way to implement the Runnable interface
2.3 Third Kind - Implementing Callable Interface
2.4 Common Thread Constructors
2.5 Is it better to inherit ...
Posted by Terrum on Wed, 09 Oct 2019 00:56:05 +0200
Multithread Foundation in Java
Threads and processes
Process:
Process is the basic unit of program operation and resource allocation. A program has at least one process.
As shown in the following figure:
Threading:
Thread is the basic unit of CPU scheduling and allocation. A process has at least one thread.
Threads in the same process share process resources (red ...
Posted by brucemalti on Tue, 08 Oct 2019 22:01:43 +0200