Jiefang's Blog

过去心不可得,现在心不可得, 未来心不可得

Java集合-19丨SynchronousQueue

SynchronousQueue 简介 Java注释 A {@linkplain BlockingQueue blocking queue} in which each insert operation must wait for a corresponding remove operation by another thread, and vice versa. A synchro...

Java集合-18丨PriorityBlockingQueue

PriorityBlockingQueue 简介 Java注释: An unbounded {@linkplain BlockingQueue blocking queue} that uses the same ordering rules as class {@link PriorityQueue} and supplies blocking retrieval operatio...

Java集合-17丨PriorityQueue

PriorityQueue 简介 Java注释 An unbounded priority {@linkplain Queue queue} based on a priority heap.The elements of the priority queue are ordered according to their {@linkplain Comparable natural ...

Java集合-16丨LinkedBlockingQueue

LinkedBlockingQueue 简介 Java注释 An optionally-bounded {@linkplain BlockingQueue blocking queue} based on linked nodes. This queue orders elements FIFO (first-in-first-out). The head of the queue ...

Java集合-15丨ArrayBlockingQueue

ArrayBlockingQueue 简介 Java注释 A bounded {@linkplain BlockingQueue blocking queue} backed by an array. This queue orders elements FIFO (first-in-first-out). The head of the queue is that elemen...

Java集合-14丨ConcurrentSkipListSet

ConcurrentSkipListSet 简介 Java注释 A scalable concurrent {@link NavigableSet} implementation based on a {@link ConcurrentSkipListMap}. The elements of the set are kept sorted according to their {...

Java集合-13丨CopyOnWriteArraySet

CopyOnWriteArraySet 简介 官方注释 A {@link java.util.Set} that uses an internal {@link CopyOnWriteArrayList} for all of its operations. Thus, it shares the same basic properties:<ul> <l...

Java集合-12丨TreeSet

TreeSet 简介 Java注释 A {@link NavigableSet} implementation based on a {@link TreeMap}.The elements are ordered using their {@linkplain Comparable natural ordering}, or by a {@link Comparator} prov...

Java集合-11丨LinkedHashSet

LinkedHashSet 简介 官方注释 Hash table and linked list implementation of the Set interface,with predictable iteration order. This implementation differs from HashSet in that it maintains a doubly-li...

Java集合-10丨HashSet

HashSet 简介 This class implements the Set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not...

Java集合-09丨ConcurrentSkipListMap

ConcurrentSkipListMap 简介 跳表是一个随机化的数据结构,实质就是一种可以进行二分查找的有序链表。 跳表在原有的有序链表上面增加了多级索引,通过索引来实现快速查找。 跳表不仅能提高搜索性能,同时也可以提高插入和删除操作的性能。 存储结构 类图 ConcurrentSkipListMap是线程安全的有序的哈希表,适用于高并发的场景。 源码 ...

JVM-14丨SafePoint(安全点)

SafePoint 简介 A point in program where the state of execution is known by the VM,即代码中VM能够准确知道执行状态的位置。 safepoint可以用在不同地方,比如GC、Deoptimization,在HotspotVM中,GC safepoint比较常见,需要一个数据结构记录每个线程的调用栈、寄存器...

Dubbo-01丨Apache Dubbo介绍

Apache Dubbo介绍 Apache Dubbo 是一款高性能、轻量级的开源Java RPC框架,它提供了三大核心能力:面向接口的远程方法调用,智能容错和负载均衡,以及服务自动注册和发现。 简介 Apache Dubbo ˈdʌbəʊ is a high-performance, java based R...

Java集合-08丨ConcurrentHashMap

ConcurrentHashMap 问题 ConcurrentHashMap的数据结构? ConcurrentHashMap是怎么解决并发安全问题? ConcurrentHashMap使用了哪些锁? ConcurrentHashMap的扩容? ConcurrentHashMap是否是强一致性的? 简介 ConcurrentHashMap是HashMap的线程安...

Eureka-07丨Eureka Server 启动流程

Eureka Server 启动流程 1、启动EurekaServer 1 2 3 4 5 6 7 @EnableEurekaServer @SpringBootApplication public class EurekaServerApplication { public static void main(String[] args) { SpringApplic...

Eureka-06丨服务实例配置信息

服务实例配置信息 参数名称 说明 默认值 eureka.instance.appname 注册到注册中心的应用名称 unknown eureka.instance.a-s-g-name 注册到注册中心的应用所属分组名称(AWS...

Eureka-05丨Eureka Server 配置参数

Eureka Server 配置参数(eureka.server.*) org.springframework.cloud.netflix.eureka.server.EurekaServerConfigBean Eureka Server配置 参数名称 说明 默认值 eureka.serv...

Eureka-04丨Eureka Client 配置参数

Eureka Client 配置参数(eureka.client.*) org.springframework.cloud.netflix.eureka.EurekaClientConfigBean 参数名称 说明 默认值 eureka.client.enabled 用于指示Eu...

Eureka-03丨Eureka和Zookeeper对比

Eureka和Zookeeper对比 CAP原则 CAP原则又称CAP定理,指的是在分布式系统的设计中,没有一种设计可以同时满足 Consistency(一致性)、 Availability(可用性)、Partition tolerance(分区容错性)3个特性,这三者不可得兼。 Consistency:一致性,在分布式系统中的所有数据备份,在同一时刻是否同样的值。 Av...

Eureka-02丨Eureka架构

Eureka架构 数据存储结构 Eureka的数据结构分为:数据存储层(比作MySQL)和二级缓存层(比作Redis)。 数据存储层 registry 本质上是一个双层的ConcurrentHashMap,存储在内存中的。 第一层Map的key是spring.application.name,value 是第二层 ConcurrentHashMap; 第二层 Concurr...