Package | Description |
---|---|
org.tinygroup.sequence | |
org.tinygroup.sequence.impl |
Modifier and Type | Method and Description |
---|---|
SequenceRange |
SequenceDao.nextRange(String name)
取得下一个可用的序列区间
|
Modifier and Type | Method and Description |
---|---|
SequenceRange |
DefaultSequenceDao.nextRange(String name) |
SequenceRange |
MultipleSequenceDao.nextRange(String sequenceName,
long minValue,
long maxValue,
int innerStep)
获取下一个sequence 段
|
SequenceRange |
SequenceDataSourceHolder.tryOnAvailableDataSource(int index,
String sequenceName,
long minValue,
long maxValue,
int innerStep,
int outStep,
List<Integer> excludeIndexes)
在可用的数据源上获取sequence段,如果发生异常,则进行统计
|
SequenceRange |
SequenceDataSourceHolder.tryOnFailedDataSource(int index,
String sequenceName,
long minValue,
long maxValue,
int innerStep,
int outStep,
List<Integer> excludeIndexes)
在故障的数据源上进行单线程重试,每隔2s允许一个业务单线程进入重试状态, 如果访问成功则标记该数据源为可用,否则去寻找其他可用数据源。
采用的是非阻塞锁实现的并发控制。 |
SequenceRange |
SequenceDataSourceHolder.tryOnSelectedDataSource(int index,
String sequenceName,
long minValue,
long maxValue,
int innerStep,
int outStep,
List<Integer> excludeIndexes)
在随机选择的数据源上获取sequence段
|
Copyright © 2006–2018 TinyGroup. All rights reserved.