JVM tuning exploring physical memory return mechanism of CMS and G1

Preface: The company has an asset statistics system, which is very low in usage, but requires fast query speed in use. Therefore, we want to make some caches stored in memory, not used for a long time, persistent to disk, and recycle garbage, return physical memory to the operating system, so as to save valuable resources to other businesses. S ...

Posted by timbr8ks on Mon, 22 Jul 2019 05:47:03 -0700

Android uses Kotlin to build Gradle

Android Studio Gradle 3.4.2 5.1.1 First of all, kotlin-dsl is nothing new. Gradle 5.0 was releasedGradle Kotlin DSL The current version is 1.0.2 Is it possible to abandon groovy and embrace kotlin now? Migration is still a bit of a hassle! Currently, when creating a project in Android Studio, Groo ...

Posted by techjosh on Thu, 18 Jul 2019 23:16:43 -0700

Use and Analysis of [Curator] Shared Lock

Shared Lock and Shared Reentrant Lock Similar, but not reentrant > A complete distributed lock means that there will be no two holders for the same lock at the same time point. That is, at the same time, the same lock, there is at most one holder. 1. Key API s org.apache.curator.framework.recipes.locks.InterProcessSemaphoreMutex 2. Mechanism ...

Posted by duckula on Wed, 26 Jun 2019 14:05:19 -0700

Setup of kotlin's first project

How do I use Kotlin in Android Studio? 1. Using Android Studio plugins 2. Upgrade Android Studio to version 3.0: Not recommended at this time because version 3.0 is still the Dev Channel channel, i.e. the development channel, which has not yet been officially released So today we're going to talk about how to create the first Kotlin project usi ...

Posted by gibbo101 on Mon, 24 Jun 2019 11:08:40 -0700

Using Gradle to Create Java Projects under Windows

Create a project First, you need to create a Java project with the following directory structure: / src/main/java/hello. You can create several Java classes under the Hello directory. Here, HelloWorld.java and Greeter.java are created for convenience. The code is as follows: src/main/java/hello/HelloWorld.java package hello; public class ...

Posted by jax_15 on Fri, 21 Jun 2019 16:06:58 -0700

Foundation Enhancement_XML

<!-- xml escape characters: characters with special meanings can be expressed using escape characters < &lt; > &gt; " &quot; ' &apos; & &amp; Requirement: Writing of 1 < 3 == 5 > 7 in xml --> .<!-- Demand: You can use escape characters to display the following in text <bean id="abc"> < ...

Posted by kalebaustin on Tue, 18 Jun 2019 12:32:31 -0700

Spring AOP IV: Dynamic Data Source Switching Using AOP

Brief Introduction and Dependence The premise of the project is to install MySQL database, and establish two databases, one is master and the other is slave, and both databases have a user table. The table export statement is as follows: DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` ...

Posted by Shamrox on Mon, 17 Jun 2019 14:24:26 -0700

RxJava Tour (2): Getting started with RxJava (1)

0. Preface This is probably the most serious series of articles I have delayed since the first one Journey to RxJava (1): Fundamentals of RxJava Thought Almost a year apart from this one, I was ashamed to think of the series, and even the impulse was almost deleted several times.The thing is, I immediately put myself into the company's new proj ...

Posted by lorenzo-s on Mon, 03 Jun 2019 19:32:11 -0700

Introduction and simple examples of factory pattern (static factory pattern, factory method pattern, abstract factory pattern) in java va

Java Medium Factory Model Java ee is a common pattern, which can be divided into three types: static factory mode, factory method mode and abstract factory mode. Let's give a brief introduction and examples.   Static Factory Mode: As its name implies, it is realized by static method. The objects it creates have certain characteristics, such ...

Posted by cbrooks on Wed, 29 May 2019 11:46:17 -0700

hibernate01 of SSH and SSM Learning: Introduction and Environment Construction

Introduction to hibernate01 of SSH and SSM Learning and Environment Construction Introduction to hibernate II Necessary Environment 1 Development Tool 2 Database 3 hibernate 4 junit is not necessary Basic configuration of three projects 1 Create a project 2 Fill in the project name 3 Create classes and lib directories 4 Import hibernat ...

Posted by lovasco on Fri, 24 May 2019 14:45:17 -0700