public long [ ] parseId ( long id ) { long [ ] arr = new long [ 5 ] ; arr [ 4 ] = ( ( id & diode ( unusedBits , timestampBits ) ) >> timestampShift ) ; arr [ 0 ] = arr [ 4 ] + epoch ; arr [ 1 ] = ( id & diode ( unusedBits + timestampBits , datacenterIdBits ) ) >> datacenterIdShift ; arr [ 2 ] = ( id & diode ( unusedBits + timestampBits + datacenterIdBits , workerIdBits ) ) >> workerIdShift ; arr [ 3 ] = ( id & diode ( unusedBits + timestampBits + datacenterIdBits + workerIdBits , sequenceBits ) ) ; return arr ; }
extract time stamp datacenterId workerId and sequence number information from the given id