Package | Description |
---|---|
org.tinygroup.sequence | |
org.tinygroup.sequence.impl |
Modifier and Type | Method and Description |
---|---|
SequenceRange |
SequenceDao.nextRange(String name)
取得下一个可用的序列区间
|
long |
Sequence.nextValue()
取得序列下一个值
|
Modifier and Type | Method and Description |
---|---|
Map<String,Map<String,Object>> |
MultipleSequenceDao.getSequenceRecordByName(String sequenceName)
根据sequenceName来获取一条记录,便于查询sequence当期的区段.
|
Map<String,Map<String,Object>> |
SequenceDataSourceHolder.getSequenceRecordByName(String selectSql,
String minValueColumnName,
String maxValueColumnName,
String innerStepColumnName,
String sequenceName)
根据sequenceName 获取当前db里的指定sequence记录的各字段值
|
void |
MultipleSequence.init()
初始化各个数据源的sequence,如果不存在记录就插入一条到db
|
void |
SequenceDataSourceHolder.initSequenceRecord(int index,
String sequenceName,
int innerStep,
int outStep,
long minValue,
long maxValue,
String valueColumnName)
初始化sequence 记录,如果db里存在该记录就跳过;否则对此进行初始化
|
void |
MultipleSequenceDao.initSequenceRecord(String sequenceName,
long minValue,
long maxValue,
int innerStep)
初始化sequence的初始值,每个数据源都要去检查一遍,如果不存在就插入一条记录
|
SequenceRange |
DefaultSequenceDao.nextRange(String name) |
SequenceRange |
MultipleSequenceDao.nextRange(String sequenceName,
long minValue,
long maxValue,
int innerStep)
获取下一个sequence 段
|
long |
MultipleSequence.nextValue()
获取sequence值
|
long |
DefaultSequence.nextValue() |
SequenceRange |
SequenceDataSourceHolder.tryOnAvailableDataSource(int index,
String sequenceName,
long minValue,
long maxValue,
int innerStep,
int outStep,
List<Integer> excludeIndexes)
在可用的数据源上获取sequence段,如果发生异常,则进行统计
|
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.