unit uTOverCostActionArg;
interface
type
TOverCostActionArg = class
private
FActionType: Integer;
FTimeTick: Int64;
FWorkerId: Word;
FOverCostCountInOneTerm: Integer;
FGenCountInOneTerm: Integer;
FTermIndex: Integer;
public
///
/// 事件类型
/// 1-开始,2-结束,8-漂移
///
property ActionType: Integer read FActionType write FActionType default 0;
///
/// 时间戳
///
property TimeTick: Int64 read FTimeTick write FTimeTick;
///
/// 机器码
///
property WorkerId: Word read FWorkerId write FWorkerId;
///
/// 漂移计算次数
///
property OverCostCountInOneTerm: Integer read FOverCostCountInOneTerm write FOverCostCountInOneTerm default 0;
///
/// 漂移期间生产ID个数
///
property GenCountInOneTerm: Integer read FGenCountInOneTerm write FGenCountInOneTerm default 0;
///
/// 漂移周期
///
property TermIndex: Integer read FTermIndex write FTermIndex default 0;
constructor Create(const WorkerId: Word; const TimeTick: Int64; const ActionType: Integer = 0;
const OverCostCountInOneTerm: Integer = 0; const GenCountWhenOverCost: Integer = 0;
const Index: Integer = 0); overload;
end;
implementation
{ TOverCostActionArg }
constructor TOverCostActionArg.Create(const WorkerId: Word; const TimeTick: Int64; const ActionType: Integer;
const OverCostCountInOneTerm: Integer; const GenCountWhenOverCost: Integer; const Index: Integer);
begin
FWorkerId := WorkerId;
FTimeTick := TimeTick;
FActionType := ActionType;
FOverCostCountInOneTerm := OverCostCountInOneTerm;
FGenCountInOneTerm := GenCountWhenOverCost;
FTermIndex := Index;
end;
end.