Java ------ this keyword
1, What is this keyword
this is a keyword in java;
This can be a reference or a variable in java. When it is a variable, the memory address saved in the variable points to itself, and this is stored in the JVM heap memory java object
2, What is the function of this keyword
1. The first function of this keyword is to pass the value of the loc ...
Posted by ashok_bam on Thu, 09 Apr 2020 08:16:59 -0700
Quickly master the multi thread synchronization mechanism and multi thread summary (quick pick up the dry goods!)
Synchronization mechanism
1, Synchronization block
When multiple threads operate on the same data, data errors and data insecurity are caused.
Solution: when multiple threads operate on the same data, only one thread can operate on the data at a time
The synchronization block syntax used in Java is as follows:
synchronized(obj) {/ / ...
Posted by Chris Mayo on Tue, 07 Apr 2020 09:35:45 -0700
Gradle this article is enough for 08 wrapper
Use of wrapper
Gradle Wrapper is the recommended usage of gradle. This article will illustrate how to use it with specific examples.
Gradle Wrapper
The Gradle Wrapper is actually a script, which can be used to download and use the specified version of gradle. It can be downloaded before use as required, effectively avoiding environment consiste ...
Posted by jfontein on Sun, 05 Apr 2020 18:29:11 -0700
007. Use of J.U.C locks
1. Lock API
1. Locks package class hierarchy
2. Lock interface
Method Signature
describe
void lock();
Acquire locks (endless)
boolean tryLock();
Acquire locks (just try it)
boolean tryLock(long time, TimeUnit unit) throws InterruptedException;
Acquire locks (out of date)
void lockInterruptibly() throws InterruptedException;
Acquire ...
Posted by Smasher on Sun, 05 Apr 2020 17:27:36 -0700
Using jconsole to check java thread deadlock
1, What is jconsole
jconsole is the built-in Java performance analyzer of jdk, which is used to monitor the performance of Java applications and track the code in Java;
It has a close relative, that is, JVM;
2, How to use
1. It's very simple. On the command line of idea, enter:
D:\java\workspace\AS> jconsole
The GUI:
Here is a dead ...
Posted by Pi_Mastuh on Fri, 03 Apr 2020 20:19:10 -0700
Threads in Java (I) (basic method)
1, The concept of multithreading
1. Process: every program being executed is called a process. Process is an independent unit of resource allocation and call. Each process has its own memory space and system resources.
2. Thread: a thread is an execution path of a process. A process with only one execution path is call ...
Posted by largo on Thu, 02 Apr 2020 22:59:25 -0700
Java exception handling
1, Exception overview and exception architecture
1. Overview of exceptions
In the process of using computer language for project development, even if the programmer writes the code perfectly, there are still some problems in the operation of the system, because many problems can not be avoided by the code, such as: the format of customer input ...
Posted by jeethau on Mon, 30 Mar 2020 01:43:32 -0700
9. SpringCloud Chapter 9, Upgrade, Load Balancing and Service Calls Ribbon and OpenFeign
SpringCloud Chapter VIII, Upgrade, Load Balancing and Service Calls Ribbon and OpenFeign
1. Ribbon
1. Overview
SpringCloud Ribbon is a set of client load balancing tools that give NetFlex Ribbon implementations.
Simply put, the main function is to provide load balancing algorithms and service calls for clients.The Ribbon client componen ...
Posted by worldcomingtoanend on Sun, 29 Mar 2020 21:12:58 -0700
JVM learning: classloader
What is a classloader:
public class ClassInit {
public static void main(String[] args) {
ClassLoader c=ClassInit.class.getClassLoader();
}
}
The ClassLoader above is the ClassLoader
Print c, and notice a Launcher class:
sun.misc.Launcher$AppClassLoader@18b4aac2
Enter the Launcher class and notice two pieces of code:
var1 ...
Posted by bluedot on Thu, 12 Mar 2020 04:54:12 -0700
Flink Summary - set Jvm parameters
jvm settings
http://www.360doc.com/content/12/1023/16/9615799_243296263.shtml
Heap setup
-Xms: initial heap size
-Xmx: maximum heap size
-20: Newsize = n: set younger generation size
-20: Newratio = n: set the ratio of young generation to old generation. For example, if it is 3, it means that t ...
Posted by rinkhals on Thu, 12 Mar 2020 04:03:51 -0700