public long generateWanId(long threadId, long offset, int gatewayIndex) {
      assert this != RESERVED;
      return Bits.WAN_TYPE.shift(ordinal()) | Bits.WAN.shift(offset)
          | Bits.GATEWAY_ID.shift(gatewayIndex) | threadId;
    }
Generates a new thread id for usage in a parallel wan context.

@param threadId the original thread id
@param offset the thread offset
@param gatewayIndex the index of the gateway
@return the new thread id
geode-core/src/main/java/org/apache/geode/internal/cache/ha/ThreadIdentifier.java