public class ECIDUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME |
private static int |
ENCODING_FORMAT_IPv4_LENGTH |
private static int |
ENCODING_FORMAT_IPv6_LENGTH |
private static int |
IPv4_MASK |
private static int |
IPv4_MOVE |
private static int |
IPv4_SHIFT |
private static int |
IPv6_MASK |
private static int |
IPv6_MOVE |
private static int |
IPv6_SHIFT |
private static int |
s_ecidSize |
private static java.lang.String |
s_processId |
private static java.util.concurrent.atomic.AtomicLong |
sECIDCounter |
private static int |
UB1_BITS
IP bit obfuscation values
|
private static int |
UB1_MASK |
private static int |
UB4_BITS |
Constructor and Description |
---|
ECIDUtils() |
Modifier and Type | Method and Description |
---|---|
private static int |
bitSwap(int value,
int skip)
Swap pairs of bits in the int value.
|
(package private) static int |
byteGet(int value,
int target)
Get the target byte in an int.
|
(package private) static int |
byteShift(int target)
Get the number of bits to shift to the target byte in an int.
|
private static int |
byteSwap(int value,
int source,
int target)
Swap the source byte in the value to the target byte location.
|
static java.lang.String |
createECID()
Create a unique ECID for this ContextFamily.
|
private static java.lang.String |
createProcessId()
Create the process id string used in ECID creation
|
private static java.lang.String |
createProcessIdIP()
Create the process id string from the system IP address.
|
private static java.lang.String |
createProcessIdIPv4(byte[] ipBytes,
int pid)
Create the process id string from the IPv4 address and pid.
|
private static java.lang.String |
createProcessIdIPv6(byte[] ipBytes,
int pid)
Create the process id string from the IPv6 address and pid.
|
private static final int ENCODING_FORMAT_IPv4_LENGTH
private static final int ENCODING_FORMAT_IPv6_LENGTH
private static final int UB1_BITS
private static final int UB1_MASK
private static final int UB4_BITS
private static final int IPv4_SHIFT
private static final int IPv4_MOVE
private static final int IPv4_MASK
private static final int IPv6_SHIFT
private static final int IPv6_MOVE
private static final int IPv6_MASK
private static java.util.concurrent.atomic.AtomicLong sECIDCounter
private static int s_ecidSize
private static java.lang.String s_processId
public static final java.lang.String CLASS_NAME
private static java.lang.String createProcessId()
private static java.lang.String createProcessIdIP()
private static java.lang.String createProcessIdIPv6(byte[] ipBytes, int pid)
ipBytes
- The IPv6 address.pid
- The process id.private static java.lang.String createProcessIdIPv4(byte[] ipBytes, int pid)
ipBytes
- The IPv4 address.pid
- The process id.private static int byteSwap(int value, int source, int target)
value
- The value int for the source byte.source
- The source byte in value (0-4).target
- The target byte in an int (0-4).private static int bitSwap(int value, int skip)
value
- The value int whose bits are to be swapped.skip
- The bit pair NOT to swap in value.static int byteShift(int target)
target
- The target byte in the int (0-4).static int byteGet(int value, int target)
target
- The target byte in the integer (0-4).public static java.lang.String createECID()