JavaSE concurrent programming
Articles Catalogue
Concurrent programming
Thread Foundation
Thread group
Atomics
JMM (Java Memory Model)
Lock mechanism
Synchronization strategy
Blocking queue
Actuator
Concurrent programming
Concurrent programming mainly involves multi-process and multi-threaded programming, while java usually ...
Added by areid on Sun, 04 Aug 2019 16:32:52 +0300
How to use java data structure to write code
How to use java data structure to write code
Array data structure
Initialization of arrays
public static void main(String[] args) {
int[] arrays = new int[5]; // Define and open up an array of length 3
// You can write the above code in two sentences
int[] array = null; // Declare a variabl ...
Added by bhola on Sun, 28 Jul 2019 09:20:19 +0300
Is String really immutable?
Preface
When you mention String in Java, you always mention that String is immutable.But is this true?Can String's immutability be destroyed?
Before validating, you need to first introduce the immutable properties of String.
PS: Also mention the interview questions you have encountered here:
String str = "abc";
// Output def
System.out.printl ...
Added by golfinggod on Wed, 24 Jul 2019 19:09:47 +0300
Talking about java annotations <the most easy-to-understand annotations>
Foreword: The meaning of Annotation in Chinese.
Java annotations are used to provide metadata for Java code.
Metadata refers to the data used to describe data, which, in general, describes the relationship between codes or the internal relationship between codes and other resources (such as database tables). In some technical frameworks, such ...
Added by jamkelvl on Wed, 24 Jul 2019 06:00:22 +0300
Handwritten A Simple IOC Framework--FindViewById
Reflection
1. Introduction to Reflection
JAVA reflection mechanism is that all attributes and methods of this class can be known for any entity class in running state; any method and attributes can be invoked and modified for any object; this function of dynamic acquisition of information and dynamic in ...
Added by Pig on Wed, 24 Jul 2019 04:34:49 +0300
Review Java Concurrency with Zhu Ye: Atomic
In this section, we will explore the Atomic types in concurrent packages.
AtomicXXX and XXXAdder and XXXAccumulator performance tests
Start with a performance test that compares AtomicLong (out of 1.5), LongAdder (out of 1.8), and LongAccumulator (out of 1.8) for simple cumulative performance.
The logic of the program is simple, you can see tha ...
Added by FFFF on Sun, 21 Jul 2019 04:45:04 +0300
Multithreaded thread pool
There are several implementations of multithreading, which are they?
a, inherit the Thread class
b. Implementing Runnable Interface
c. Implementing Callable Interface through Thread Pool
Thread pool, in fact, is a container containing multiple threads, in which threads can be used repeatedly, ...
Added by BlueKai on Sat, 20 Jul 2019 06:33:27 +0300
Docker Debugging Skills
Reuse container name
But when we write / debug Dockerfile, we often repeat previous command s, such as docker run --name jstorm-zookeeper zookeeper:3.4, and then the container name conflicts.
$ docker run --name jstorm-zookeeper zookeeper:3.4
...
$ docker run --name jstorm-zookeeper zookeeper:3.4
docker: Error response from daemon: Conflict. Th ...
Added by Fsoft on Mon, 15 Jul 2019 22:22:52 +0300
Spring4-Container 9-Custom bean Feature
Spring provides several marker interface s that alter the behavior of beans in containers; they include InitializingBean and Disposable bean.The beans implementing both interfaces invoke the lattPropertiesSet() method of the former and the destroy() method of the latter when initializing and destructing.
In modern Spring applications, The J ...
Added by [L3]sPARTAN on Mon, 15 Jul 2019 19:20:29 +0300
JAVA Thread Pool Details
JAVA Thread Pool Details
Description: Based on JDK 1.7.0.79
Why use thread pools instead of displaying create threads
Reduce the time spent creating and destroying threads and the overhead of system resources to resolve resource shortages;
The absence of a thread pool can cause the system to create a large number of similar threads, lead ...
Added by smilinmonki666 on Fri, 12 Jul 2019 21:03:31 +0300