redis cluster and sentinel mode -- 03

192.168.80.51Main db01192.168.80.11From web04192.168.80.9From web03 1. Cluster preparation To realize master-slave, please back up the data first First, a single node redis has been installed Single node installation https://blog.csdn.net/ncnhhm/article/details/121443981 Master node profile daemonize yes bind 192.168.80.51 port ...

Posted by Grunt on Mon, 29 Nov 2021 02:17:48 -0800

Kafka transaction getting started example

kafka supports transactions from version 0.2.11. This document gives a brief description of kafka transactions, java code examples, some simple descriptions of the code, and relevant precautions. I hope it can be helpful to friends who need to use kafka transactions.On June 28, 2017, Kafka officially released version 0.11.0.0. From this version ...

Posted by evanesq on Mon, 29 Nov 2021 02:12:45 -0800

Java Foundation (Application of interface: creative design pattern factory design pattern Proxy)

Application of interface: factory mode Factory mode: it realizes the separation of creator and caller, that is, the specific process of creating objects is shielded and isolated, so as to improve flexibility.In fact, both design patterns and object-oriented design principles are to make the development project easier to expand and maintain. The ...

Posted by Sinemacula on Mon, 29 Nov 2021 01:57:46 -0800

java bubble sorting (from simple to complex, from death to life)

For example: int []arr= {25,69,80,57,13,}; Basic idea of bubble sorting (from small to large): compare a[0] with a[1]. If the former is greater than the latter, exchange it before and after, otherwise no operation will be done. After this step, the larger value will be in the latter, that is, a[1]. Now we need to continue to compare to the bac ...

Posted by gaz_hayes on Mon, 29 Nov 2021 01:32:14 -0800

MongoDB vs MySQL, which is more efficient?

This article mainly introduces the use of MongoDB's bulkWrite() method by comparing batch and non batch operations. Incidentally, it is compared with relational database MySQL to compare the efficiency of these two different types of databases. If you just want to learn how to use bulkWrite(), just look at the first part.Test environment: win7 ...

Posted by chadtimothy23 on Mon, 29 Nov 2021 01:26:36 -0800

Understand the basic Object classes in Java

1, Object description Source code note: the Object class is the Root node of the hierarchical relationship of all classes. As the superclass of all classes, including arrays, it also implements the methods of this class. Note that what is said here is very clear, referring to the class level. Therefore, there is a common saying in Java that e ...

Posted by d_barszczak on Mon, 29 Nov 2021 00:23:38 -0800

LeetCode-133-clone graph

Clone graphTitle Description: give you a reference to a node in an undirected connected graph. Please return a deep copy (clone) of the graph.Each node in the graph contains its value val (int) and a list of its neighbors (list[Node]).See LeetCode's official website for an example.Source: LeetCode Link: https://leetcode-cn.com/probl... The co ...

Posted by McInfo on Sun, 28 Nov 2021 22:02:50 -0800

Java Chapter 9 learning experience

Write before: This chapter mainly talks about the knowledge of threads. Thread is essentially different from other chapters. The reason is that thread allows you to do multiple things at the same time and execute some tasks concurrently. Then let's explore the important knowledge in this chapter. catalog: 1. What is the function of futuret ...

Posted by akreation on Sun, 28 Nov 2021 21:34:21 -0800

The default value of mysql field inserted by mybatis does not take effect

In the project, mybatis is used as the persistence layer framework and mysql database. Before the project goes online, the DBA requires us to set the fields in each database table to the default value and not null. In the previous project, some insert statements listed all the fields in the table, and then used it as a general insert statement. ...

Posted by bubatalazi on Sun, 28 Nov 2021 21:06:21 -0800

Pull the thread pool upside down

This section shares the Java thread pool. Next, let's dig up the thread pool step by step. Introduction: old three withdraw money There is a programmer whose name is Lao San. The third man had no money in his pocket and hurried to do banking business. This day got up early in the morning and the bank sister said good morning. As soon a ...

Posted by phpshift on Sun, 28 Nov 2021 19:46:32 -0800