class CommonUtils {

    public static int getSeverTokenById(long id){
        // token所占位数
        long tokenBitLength = IdGenerator.getDatacenterIdBits() + IdGenerator.getServerIdBits();
        long tokenBitMax = ~(-1L << tokenBitLength);
        return (int)((id >> IdGenerator.getSequenceBits()) & tokenBitMax);
    }

}