public class RequestIdAndRpcIdFactory extends Object
| Constructor and Description |
|---|
RequestIdAndRpcIdFactory() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildNextLocalRpcId(String currentRpcId,
String nextLocalThreadId) |
static String |
buildNextRemoteRpcId(String rpcId,
int currentCall) |
static String |
buildRequestId(String rid,
String appId) |
static String |
buildTruncatedRpcId(String rpcId,
int next) |
String |
getNextId()
old version (before) use random.nextLong() to generate random trace id; now, use UUID (remove '-', and upper
case) as random trace id.
|
String |
getNextIdFromUUID()
Deprecated.
|
static String |
parseClientAppIdFromOriginalRpcId(String rpcId) |
static String |
parseRpcIdFromOriginalRpcId(String rpcId) |
public String getNextId()
2018.1.30: found UUID version (using SecureRandom) cause a little performance cost, so change to custom random string approach, reference to: https://stackoverflow .com/questions/41107/how-to-generate-a-random-alpha-numeric-string
@Deprecated public String getNextIdFromUUID()
public static String parseClientAppIdFromOriginalRpcId(String rpcId)
public static String buildNextLocalRpcId(String currentRpcId, String nextLocalThreadId)
Copyright © 2019. All rights reserved.