Alibaba P6 Interviewer: how does Redis implement distributed locks? What if the lock expires?

Principle of Redis implementing distributed lockWe talked about the application of Redis in the actual business scenario. Now let's learn about the application of Redisson functional scenario, that is, the implementation scenario of distributed locks that we often use.The concept of distributed lock will not be described in this paper.• in ...

Posted by mfindlay on Mon, 08 Nov 2021 23:44:17 -0800

Time processing (Backend)

Reference connection @Use of JsonFormat and @ DateTimeFormat annotations: https://www.cnblogs.com/mracale/p/9828346.html com.fasterxml.jackson tool class: https://www.cnblogs.com/loong-hon/p/10315000.html Detailed summary and usage of Jackson API: https://blog.csdn.net/wangmx1993328/article/details/88598625 com.fasterxml.jackson introduction ...

Posted by Vik on Mon, 08 Nov 2021 22:48:33 -0800

[shared memory] performance comparison of mmap, shm and MappedByteBuffer

Introduction Due to the need to write a java program and an existing c program (AFL) for local communication in the near future, the efficiency of sending data using udp is not very high. In addition, AFL itself uses shm to share the physical memory to obtain the execution path information of the subroutine to be tested, while the shared memor ...

Posted by rugzo on Mon, 08 Nov 2021 22:26:33 -0800

Why does the thread I interrupt execution not work

Absrtact: in the form of a case, we will introduce in detail why the thread that interrupts execution does not work. This article is shared from Huawei cloud community< Why doesn't it work when the thread is interrupted? >, author: Glacier. When we call the wait() method of a Java object or the sleep() method of a thread, we need to c ...

Posted by justAnoob on Mon, 08 Nov 2021 21:23:43 -0800

so eazy uses Netty and dynamic proxy to implement a simple RPC with one click

RPC (remote procedure call) remote procedure call RPC is used to communicate between the Java processes of two hosts in distributed applications. When host A calls the methods of host B, the process is simple, just like calling the methods in its own process. The responsibility of RPC framework is to encapsulate the details of the underlying c ...

Posted by kylecooper on Mon, 08 Nov 2021 17:30:31 -0800

JAVA static final relationship between static / construction / local code blocks

1 static 1.1 concept Is a keyword in java Used to decorate members (member variables and member methods) 1.2 features 1.static can modify member variables and methods 2. Resources modified by static are called static resources 3. Static resources are loaded with the loading of classes. They are loaded first and take precedence over objects 4. ...

Posted by echoofavalon on Mon, 08 Nov 2021 17:11:00 -0800

Java core technology -- Reflection

1, Class and Java reflection Class textFieldC=tetxField.getClass();      // Tetxfield is a JTextField class object Main description of reflection accessibility   1. Access construction method Each Constructor object represents a construction method, and the corresponding construction method can be manipulated by ...

Posted by kctigers23 on Mon, 08 Nov 2021 16:16:58 -0800

Java learning notes: container

container A Collection, also known as a Collection, is used to hold and manage data. 1. Singleton set 1.1 concept Singleton set: store data one by one. Collection interface: it is the root interface of a singleton collection and has two sub interfaces. It is divided into List interface (orderly storage, repeatable, "dynamic" arra ...

Posted by kabucek1 on Mon, 08 Nov 2021 16:13:12 -0800

javabean initialization assigns default value - Reflection implements one key assignment of all fields

abstract The docking students provide a jar, and the bean s in it are 4-level nested, and there is no document. Looking at so many attributes, I feel a little confused. Accustomed to the document format of swaggger, I wonder if there is a way to realize this requirement. Did you find it online, and then did it yourself. keyword Reflect one k ...

Posted by susannah on Mon, 08 Nov 2021 14:30:47 -0800

Java multithreading -- ReentrantLock -- use / example / principle

Original website: Java multithreading -- ReentrantLock -- use / example / principle_ CSDN blog brief introduction explain          This article introduces ReentrantLock (reentrant exclusive lock) in Java's JUC. Including: usage and principle. summary         ReentrantLock is mainly implemented ...

Posted by mailtome on Mon, 08 Nov 2021 14:26:51 -0800