Basics: introduction to distributed locks

catalogue Fundamentals: distributed locks Why do I need distributed locks? Characteristics of distributed locks Common scenarios Redis implements distributed locks Redisson distributed lock entry practice reference Fundamentals: distributed locks The synchronized keyword and ReentrantLock reentrant lock in Java can control concurrent ...

Added by lauxanh on Sun, 09 Jan 2022 06:10:50 +0200

ReentrantLock usage and source code analysis

Basic introduction Compared with synchronized, it has the following characteristics InterruptibleCan be set to fair lockYou can set the timeoutMultiple condition variables are supported, that is, threads that do not meet the conditions can be placed in different collections to wait Like synchronized, reentrant is supported Basic grammar ...

Added by brendandonhue on Sun, 09 Jan 2022 05:17:50 +0200

[Java foundation] reflection mechanism summary

introduction When I first learned Java reflection mechanism, I just felt very magical, but I didn't know how to use it, so I forgot it after a period of time; Recently, I came into contact with the framework, encountered reflection in my study, and deeply realized the magic of the reflection mechanism. I came back to review the reflection mech ...

Added by Kitara on Sun, 09 Jan 2022 04:49:53 +0200

Python learning 3 (multithreading)

Multithreading Using threads, you can put tasks in programs that occupy a long time in the background.The user interface can be more attractive. For example, if the user clicks a button to trigger the processing of some events, a progress bar can pop up to display the processing progress.The program will run faster.In the implementation of som ...

Added by micki on Sun, 09 Jan 2022 01:02:05 +0200

JDBC database operations

Tip: After the article is written, the catalog can be generated automatically, how to generate the help document to the right Article Directory PrefaceI. Database Operation StatementPreparedStatementResultSetResultSetMetaData2. Return a record in a table for different table query operationsthree And implement common query operatio ...

Added by multe-media on Sat, 08 Jan 2022 20:29:54 +0200

[Yugong series] January 2022 Java Teaching Course 57 - object serialization and deserialization

1, Serialization and deserialization of objects 1. Object serialization stream Introduction to object serialization Object serialization: saving objects to disk or transferring objects over the networkThis mechanism uses a byte sequence to represent an object, which contains information such as object type, object data and attribute ...

Added by figuringout on Sat, 08 Jan 2022 19:10:16 +0200

Pluggable annotation processing API

   after JDK 1.5, the Java language provides support for annotations, which, like ordinary java code, play a role during runtime. JSR-269: Pluggable Annotations Processing API of JSR-269 specification is implemented in JDK 1.6. Provides a set of standard APIs for plug-in Annotation processors that process annotations during compilatio ...

Added by hwttdz on Sat, 08 Jan 2022 16:55:32 +0200

JUC basic learning

11. Thread pool (key) Thread pool: 3 methods, 7 parameters and 4 rejection strategies Pool technology The operation of the program, essence: occupy the resources of the system! (optimize the use of resources = > pooling Technology) Create and destroy thread pool, connection pool, memory pool and object pool. It is a waste of resource ...

Added by egalp on Sat, 08 Jan 2022 16:18:03 +0200

Explore the Bean life cycle of Spring~~

Source download The source code of this chapter is github What is the lifecycle of spring beans For ordinary Java objects, create the object when new, and then the object can be used. Once the object is no longer used, Java automatically garbage collects it. The objects in Spring are beans. Beans are no different from ordinary Java object ...

Added by joe2 on Sat, 08 Jan 2022 14:10:29 +0200

Java Foundation (exception)

1: Basic knowledge points of exceptions (1) What is the exception?      1. Anomalies simulate "abnormal" events in the real world.      2.java uses "classes" to simulate exceptions.      3. Class can create objects.          NullpointerException e = 0*12345; e is the refer ...

Added by moffo on Sat, 08 Jan 2022 13:45:09 +0200