JAVA realizes file locking and tamper proof -- JAVA programming thought 83

In the code, you can lock the code fragment through the synchronized keyword. Suppose we need to lock the file, and synchronized can only lock the JAVA execution code. What if another thread operating the file is another local thread in the operating system? At this time, it is obviously not possible to lock only through the synchronized keywor ...

Added by Otoom on Sun, 19 Dec 2021 09:52:53 +0200

Sorting out NIO basic knowledge points -- except selector

The JVM reads the data model Program execution efficiency is more determined by I/O efficiency Need to wait for data transmission It is the insufficient efficiency of JVM in I/O that leads to the reduction of program efficiency. In the operating system, large pieces of data can be read directly from the hardware, and the JVM I/O prefe ...

Added by Yegg on Thu, 09 Dec 2021 17:48:27 +0200