1
0
mirror of synced 2026-04-13 03:48:38 +08:00
Files
SnowFlake-IdGenerator/D/source/yitter/contract/OverCostActionArg.d
BitWorld a82d9cb063 !6 D语言移植
* Porting to D
* The pthread needed.
2021-04-08 21:04:43 +08:00

53 lines
1.0 KiB
D
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 版权属于yitter(yitter@126.com)
* 开源地址https://gitee.com/yitter/idgenerator
*/
module yitter.contract.OverCostActionArg;
/**
* Id生成时回调参数
*/
class OverCostActionArg {
/**
* 事件类型
* 1-开始2-结束8-漂移
*/
int ActionType = 0;
/**
* 时间戳
*/
long TimeTick = 0;
/**
* 机器码
*/
short WorkerId = 0;
/**
*
*/
int OverCostCountInOneTerm = 0;
/**
* 漂移期间生产ID个数
*/
int GenCountInOneTerm = 0;
/**
* 漂移周期
*/
int TermIndex = 0;
this(short workerId, long timeTick, int actionType, int overCostCountInOneTerm,
int genCountWhenOverCost, int index) {
ActionType = actionType;
TimeTick = timeTick;
WorkerId = workerId;
OverCostCountInOneTerm = overCostCountInOneTerm;
GenCountInOneTerm = genCountWhenOverCost;
TermIndex = index;
}
}