Completely play with singleton mode

Hungry Chinese style: class is initialized when loading. There is no problem of concurrent access and there will be a waste of resourcesLazy type: delay loading and instantiate the object only when it is used. There is a problem of concurrent access and high resource utilizationDouble detection lock: the synchronized keyword is used to ...

Posted by Ruski on Thu, 10 Feb 2022 21:29:08 +0100

Chapter 14 details of object-oriented high-level class I Variables & class methods in JavaSE topic

1. Class variable Differences between class variables and instance variables (key points) Variable categoryVariable definitionVariable callVariable value changeClass variableClass is modified by staticClass name Variable name / object name Variable nameClass variable is shared by all objects. As long as its value is changed by one object, the ...

Posted by ecko on Thu, 10 Feb 2022 20:18:18 +0100

Java project: design and implementation of Aiyou travel platform (java+springboot+ssm)

Source code acquisition: download from "resources" on the blog home page! Project significance: Since the reform and opening up, China's tourism has developed rapidly, but comparatively speaking, the breadth and depth of China's tourism development are far from meeting the needs of economic development and the improvement of peopl ...

Posted by jandrews3 on Thu, 10 Feb 2022 20:03:51 +0100

Object oriented programming of Java core

Object oriented programming of Java core essence Organize code in the form of class and encapsulate data in the form of object Review method calls static Static method static is loaded with the class //demo01 public class demo01 { public static void main(String[] args) { student.say();//Direct call } } //studen ...

Posted by johncox on Thu, 10 Feb 2022 19:00:21 +0100

minio cluster installation document

1. Preparatory work 1. min officials recommend at least 4 nodes nodeIPdatayouduk2xxx.xxx.xxx.xxx/home/minio/data1 /home/minio/data2youduk3xxx.xxx.xxx.xxx/home/minio/data1 /home/minio/data2youduk4xxx.xxx.xxx.xxx/home/minio/data1 /home/minio/data2youduk5xxx.xxx.xxx.xxx/home/minio/data1 /home/minio/data2 2,mkdir /home/minio/{data1,data2,run} Cr ...

Posted by terry1989 on Thu, 10 Feb 2022 18:45:10 +0100

Mybatis quick start

1.Mybatis Environmental Science: JDK 1.8Mysql 5.7maven 3.6.1IDEA 2. Introduction 2.1 what is MyBatis MyBatis is an excellent persistence layer frameworkMyBatis avoids almost all JDBC code and the process of manually setting parameters and obtaining result setsMyBatis can use simple XML or annotations to configure and map native information ...

Posted by pbaker on Thu, 10 Feb 2022 18:35:19 +0100

Notes on sword finger offer JZ1-5

A references Book "sword finger offer (Second Edition)" Search in JZ01 binary array 1. Title Description In a two-dimensional array (each one-dimensional array has the same length), each row is sorted in ascending order from left to right, and each column is sorted in ascending order from top to bottom. Please complete a function, ...

Posted by sentback on Thu, 10 Feb 2022 18:21:25 +0100

Java collection source code analysis: ArrayList

After so much preparation, it finally started. Ha, ArrayList Kaigan! ArrayList should be the most frequently used collection class. Let's take a look at how the document introduces it. We can know that ArrayList is actually a replica of Vector, but it only removes thread safety. ArrayList is a List implementation that can be dynamically resize ...

Posted by magie on Thu, 10 Feb 2022 17:56:56 +0100

How to develop PyFlink API jobs from 0 to 1

Introduction: taking Flink 1.12 as an example, this paper introduces how to use Python language to develop Flink jobs through PyFlink API. As the most popular stream batch unified computing engine, Apache Flink is widely used in real-time ETL, event processing, data analysis, CEP, real-time machine learning and other fields. Starting from Fl ...

Posted by LoganK on Thu, 10 Feb 2022 17:55:11 +0100

Netty parameter tuning

1, CONNECT_TIMEOUT_MILLIS Parameters belonging to socketchannelWhen the client establishes a connection, if the connection cannot be made within the specified milliseconds, a timeout exception will be thrownNote: don't use so in Netty_ Timeout is mainly used for blocking IO, while Netty is non blocking io Examples public class TimeOutTes ...

Posted by PCSpectra on Thu, 10 Feb 2022 17:38:30 +0100