📄 seq.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: Seq.java
package com.SGIP12.sgipdata;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Seq
{
private static int Max_Seq;
private static int Min_Seq;
private static long globalSeq_1;
private static int globalSeq_2;
private static int globalSeq_3;
private static Date original = new Date();
public static Class seqclass = (new Seq()).getClass();
public Seq()
{
Min_Seq = 0;
Max_Seq = 0x7fffffff;
}
public Seq(int min_seq, int max_seq)
{
Min_Seq = min_seq;
Max_Seq = max_seq;
globalSeq_3 = Min_Seq;
}
public static synchronized void computeSequence()
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMddHHmmss");
Date date = new Date();
String dateStr = simpleDateFormat.format(date);
if(globalSeq_3 == Max_Seq)
globalSeq_3 = Min_Seq;
else
globalSeq_3++;
globalSeq_2 = Integer.parseInt(dateStr);
}
public long getGlobalSeq_1()
{
return globalSeq_1;
}
public int getGlobalSeq_2()
{
return globalSeq_2;
}
public int getGlobalSeq_3()
{
return globalSeq_3;
}
public void setNodeId(long NodeID)
{
globalSeq_1 = NodeID;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -