generate
public static ID generate()
Generate a new id, combined by three long numbers.
The first one represents application instance id. (most likely just an integer value, would be helpful in
protobuf)
The second one represents thread id. (most likely just an integer value, would be helpful in protobuf)
The third one also has two parts,
1) a timestamp, measured in milliseconds
2) a seq, in current thread, between 0(included) and 9999(included)
Notice, a long costs 8 bytes, three longs cost 24 bytes. And at the same time, a char costs 2 bytes. So
sky-walking's old global and segment id like this: "S.1490097253214.-866187727.57515.1.1" which costs at least 72
bytes.
- Returns:
- an array contains three long numbers, which represents a unique id.