java object stream (serialization and deserialization)
1. Serialization and deserialization
Sequencing: refers to the storage of Java object data in heap memory to disk files or to nodes of other networks in some way.
We call this process serialization.Deserialization: The process of restoring object data from disk files or from network nodes to Java objects.Why serialization?
In a distributed s ...
Posted by ebgames56 on Tue, 18 Jun 2019 23:01:15 +0200
Multi-threaded Common Base
1: Description of processes and threads:
Processes: Each process has its own code and data space (process context), and switching between processes can be costly, with 1 to n threads per process.(Process is the smallest unit of resource allocation)
Threads: The same type of thread shares code and data space, each thread has its own run stack an ...
Posted by teo99 on Mon, 17 Jun 2019 18:05:53 +0200
Java Out-of-heap Memory Trap
Recently, we were looking for an out-of-heap memory leak problem. Through - XX: MaxDirectMemory Size, we still couldn't control the increase of out-of-heap memory until the machine's physical memory was full and oom killer.
Last article Settings for MaxDirectMemorySize MaxDirectMemorySize restricts the memory application of DirectByteBuffer, bu ...
Posted by didgydont on Sun, 16 Jun 2019 20:14:21 +0200
[Original] Uncle Experience Sharing (71) Using jvm tools in docker containers
jvm tools are often used in java applications for some operations. If a java application is deployed in a docker container, how do you use jvm tools?
First, look at the docker image used.
For example, common openjdk mirrors are divided into jdk and jre. Only the jdk version has jvm tools, so you can use the jdk version of openjdk directly.
...
Posted by degsy on Fri, 14 Jun 2019 19:43:39 +0200
jvm series: jvm tuning - jps jstat jmap jhat jstack jinfo
From: https://www.cnblogs.com/ityouknow/p/5714703.html
Using the command of JVM can help us locate the problem easily in production monitoring and printing the log information of stack. Although there are many mature tools for JVM tuning: jconsole, famous Visual VM, IBM's Memory Analyzer and so on, when problems arise in the production environ ...
Posted by Emma on Sun, 02 Jun 2019 21:01:42 +0200
Spring IOC Source Analysis - Preparations before refreshing
Catalog
Registration of ClassPathXml Application Context
Loading parent and child containers
Configuration Path Analysis
Container refresh
Refresh Pretreatment of Refresh Container
Registration of ClassPathXml Application Context
Source code analysis based on Sprin ...
Posted by cocell on Sat, 01 Jun 2019 01:52:05 +0200
Java static Keyword
static keyword explanation of Java development, no more nonsense, directly on the code
First, template class, which includes: member variables, static variables, common code blocks, static code blocks, common methods, static methods, constructors, static internal classes (including: member variables, static variables, common code blocks, stat ...
Posted by devarticles on Sun, 26 May 2019 20:17:29 +0200
Notes - Advanced Java Foundation to Face Difficulties 3
Statistical strings for each different character
import java.util.*;
//Statistics of the number of words per character in a string
public class StringDemo{
public static void main(String[] args){
Scanner aScanner = new Scanner(System.in);
//Let the user enter a string
System.out.println("Please enter the statement you want to co ...
Posted by Nilpez on Thu, 23 May 2019 20:40:41 +0200
Combining Android Studio with MAT detection and simple analysis of memory leaks
1. What is a GC?
Before analyzing memory leaks, you should first understand GC, which is commonly referred to in Java as Garbage Collection, referring to JVM automatically recycling memory data that is not referenced.
2. What is GC Roots?
GC Roots is the set of objects currently living in the Java virtual machine, each of which can act as ...
Posted by Groogy on Wed, 22 May 2019 19:30:25 +0200
Very useful Java 8 snippet
This is from me Mucho Net Handwriting: Very useful Java 8 snippet , please keep the link for upload;)
Array (array related)
chunk
Divides an array into small arrays of a specific size.
public static int[][] chunk(int[] numbers, int size) {
return IntStream.iterate(0, i -> i + size)
.limit((long) Math.ceil((double) numbers.len ...
Posted by jwadenpfuhl on Fri, 17 May 2019 05:34:10 +0200