feat: 2.0.3

1. 添加引入的算法申明
This commit is contained in:
byteblogs168 2023-07-28 11:10:56 +08:00
parent 8cf7f885e6
commit 7489d49530
4 changed files with 12 additions and 4 deletions

View File

@ -22,7 +22,8 @@ import java.util.concurrent.locks.ReentrantLock;
* @author Eric Zhao * @author Eric Zhao
* @author Carpenter Lee * @author Carpenter Lee
* *
* see https://github.com/alibaba/Sentinel/blob/master/sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/statistic/base/LeapArray.java * 特别声明: LeapArray的设计实现是使用了Sentinelv1.8.0版本的的LeapArray
* see https://github.com/alibaba/Sentinel/blob/v1.8.0/sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/statistic/base/LeapArray.java
*/ */
@Slf4j @Slf4j
public abstract class LeapArray<T> { public abstract class LeapArray<T> {

View File

@ -2,6 +2,10 @@ package com.aizuda.easy.retry.server.support.generator.id;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
/**
* 特别声明: 此算法来自美团的leaf号段模式
* see https://github.com/Meituan-Dianping/Leaf/blob/master/leaf-server/src/main/java/com/sankuai/inf/leaf/server/service/SegmentService.java
*/
public class Segment { public class Segment {
private AtomicLong value = new AtomicLong(0); private AtomicLong value = new AtomicLong(0);
private volatile long max; private volatile long max;

View File

@ -9,7 +9,9 @@ import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
/** /**
* 双buffer * 特别声明: 此算法来自美团的leaf号段模式
* see https://github.com/Meituan-Dianping/Leaf/blob/master/leaf-server/src/main/java/com/sankuai/inf/leaf/server/service/SegmentService.java
*
*/ */
@Data @Data
public class SegmentBuffer { public class SegmentBuffer {

View File

@ -32,9 +32,10 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 此算法来自美团的leaf号段模式 * 特别声明: 此算法来自美团的leaf号段模式
* see https://github.com/Meituan-Dianping/Leaf/blob/master/leaf-server/src/main/java/com/sankuai/inf/leaf/server/service/SegmentService.java
* *
* @author www.byteblogs.com * @author www.byteblogs.com
* @date 2023-05-04 * @date 2023-05-04
* @since 1.2.0 * @since 1.2.0
*/ */