This article has been included https://github.com/lkxiaolou/lkxiaolou Welcome, star.
In the previous article Design and implementation of Cobar SQL audit A question about the performance of timestamp acquisition is raised in
Get the operating system time, and directly call system in Java currentTimeMillis(); It's OK, but in Cob ...
Posted by bryan52803 on Wed, 09 Feb 2022 17:50:21 +0100
Concept: ensure that there is only one instance of a class and provide a global access point to access this unique instance
ps: Singleton mode is an object creation mode. Singleton mode has three main points: first, a class can only have one singleton, second, it must create this instance by itself, and third, it must provide this instance ...
Posted by sinisake on Wed, 09 Feb 2022 17:20:09 +0100
When accessing dynamic pages, users need to send a request to query the database through ajax to obtain dynamic data for display, but if the page has a large amount of visits and the data in the database changes frequently The rate is not high, which will cause great access pressure to the database. How to decompress the da ...
Posted by PrivatePile on Wed, 09 Feb 2022 16:11:10 +0100
Interrupt threadThread of thread Interrupt () method is to interrupt a thread. It will set the interrupt status bit of the thread, that is, set it to true. Whether the thread dies as a result of the interrupt, waits for a new task, or continues to run to the next step depends on the program itself. The thread will detect this interrupt flag bit ...
Basic exception handling syntax and procedures
The error handling mechanism in Java refers to non compiled errors, that is, non syntax errors. Similar to the division by zero error, that is, you can't divide by 0 during division. Java will encounter the following errors: example: system out. println(16 / 0);
The ArithmeticException here is ...
Posted by nihal on Wed, 09 Feb 2022 14:36:26 +0100
1. Basic introduction
The strategy pattern defines the algorithm family and encapsulates them separately so that they can replace each other. This pattern makes the change of the algorithm independent of the customers using the algorithm.This model embodies several design principles:
Opening and closing principle: separat ...
Posted by pozer69 on Wed, 09 Feb 2022 14:33:58 +0100
Originally written by binder
When it comes to binder, many people should say how old the technology of binder is, and there are a lot of articles analyzing binder. You don't need to write articles about binder at all! In fact, I don't agree with this view. Tell me my reasons:
You need to summarize the binder knowledge you have read and learne ...
Posted by rsilvs on Wed, 09 Feb 2022 14:31:53 +0100
Class modifiereffectfinalCannot be inherited from final classopenopen class that can be inheritedabstractabstract classenumEnumeration classdataData classsealedSealing classannotationAnnotation
Use the abstract keyword to mark a class as abstract
abstract class Abstract class name[(primary constructor )][:I ...
Posted by Mew151 on Wed, 09 Feb 2022 14:18:33 +0100
Tags: [advanced] [Redis] [ZooKeeper]
What is the difference between redis distributed locks and zk distributed locks?
This question has high requirements for the interviewer. It should not only understand the implementation method, but also master the principle. So the answer to the question is divided into many levels ...
Posted by alvinchua on Wed, 09 Feb 2022 13:55:27 +0100
1, IoC control reversal
IoC control inversion, fully known as Inverse of Control, is a design conceptThe agent creates and manages the object, and the consumer obtains the object through the agentThe purpose of IoC is to reduce the direct coupling between programsAdd IoC container to manage objects in a unified way and make object association ...
Posted by noginn on Wed, 09 Feb 2022 13:48:15 +0100