[!NOTE] writing This article shows some basic Redis data types and their commands using in this site. Data types Redis sets Introduction to Redis sets A Redis set is an unordered collection of unique strings (members). You can use Redis sets to efficiently: Track unique items (e...
摘要: ZGC 收集器是一款基于 Region 内存布局的,(暂时) 不设分代的,使用了读屏障、染色指针和内存多重映射等技术来实现可并发的标记 - 整理算法的,以低延迟为首要目标的一款垃圾收集器。
ZGC (“Z” 并非什么专业名词的缩写,这款收集器的名字就叫作 Z Garbage Collector) 是一款在 JDK 11中新加入的具有实验性质的低延迟垃圾收集器,是由 Oracle 公司研发的。2018 年 Oracle 创建了 JEP 333 将 ZGC 交给 OpenJDK,推动其进入 OpenJDK 11的发布清单之中。 ZGC 的目标 ZGC和Shenandoah的目标是高度相似的,都希望在尽可能对吞吐量影响不太大的前提下,实现在任意堆内存大小下都可以把垃圾收集的停顿时间限制在十毫秒以内的低延迟。但是 ZGC 和 Shenandoah 的实现思路又是差异显著的,如果说...
摘要: Typora is well known as a beautiful and powerful Markdown editor. In Typora 1.8, this editor starts to support Github style alert. This blog shows how to use it.
Alerts are an extension of Markdown used to emphasize critical information. Typora 1.8 now support Github’s way to highlight “Note” and “Warning” using blockquote (https://github.com/orgs/community/discussions/16925). To use this, firstly, please enable Github Style Alert in preferences panel: ...
Here are some basic nginx commands used in the process of deploying this site. Starting Nginx cd /etc/nginx nginx Open Nginx config file ( and then modify ) vi /etc/nginx/nginx.conf Test after modify nginx.conf nginx -t **Load new nginx.conf ...
We found following advices about setting JVM (Java Virual Machine) options -Xms and -Xmx. ::: banner {tip} Oracle recommends setting the minimum heap size (-Xms) equal to the maximum heap size (-Xmx) to minimize garbage collections. [JRockit JVM Heap Size Options-Tuning Java Virtual Machin...
摘要: Select multiple occurrences of the same word and change them all at once
|For|macOS|Windows / Linux| |-|-|-| |Select one by one|⌃ G| Alt J| |Select all|⌘ ⌃ G|Ctrl Alt Shift J| See Also (documentation) IntelliJ IDEA Help - Multiple cursors and selection ranges [Find &...
In Java (and generally in database systems), Optimistic Locking and Pessimistic Locking are two concurrency control strategies used to manage access to shared resources in multi-threaded or multi-user environments, such as database records or shared memory. Both approaches aim to ensure data...
摘要: In Java, variable visibility refers to the ability of certain parts of the code to access variables defined in other parts of the program. To ensure and control the visibility of variables, Java uses access modifiers and scope rules. Here’s how to manage and ensure variable visibility.
In Java, variable visibility refers to the ability of certain parts of the code to access variables defined in other parts of the program. To ensure and control the visibility of variables, Java uses access modifiers and scope rules. Here’s how to manage and ensure variable visibility: ...
摘要: The main purpose of volatile is to ensure visibility and ordering of changes to a variable across threads.
In Java, the volatile keyword is used to mark a variable as "volatile", which indicates that its value may be modified by multiple threads simultaneously. The main purpose of volatile is to ensure visibility and ordering of changes to a variable across threads. Here’s an explanation of ...