public class VMID extends Object implements ID
The identifier is composed of:
[ address ] - [ process id ] - [ time ] - [ counter ] |------- UID --------|
Numbers are converted to radix(Character.MAX_RADIX) when converting to strings.
UID
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected byte[] |
address
The address of the current virtual machine
|
protected int |
hashCode
The hash code of this VMID
|
protected PID |
pid
The process identifier of the current virtual machine
|
protected UID |
uid
A unique identifier to ensure uniqueness across the host machine
|
static byte[] |
UNKNOWN_HOST
The address used when conventional methods fail to return the address
of the current machine.
|
Modifier | Constructor and Description |
---|---|
protected |
VMID(byte[] address,
PID pid,
UID uid)
Construct a new VMID.
|
protected |
VMID(VMID vmid)
Copy a VMID.
|
Modifier and Type | Method and Description |
---|---|
static String |
asString()
Returns a VMID as a string.
|
Object |
clone()
Returns a copy of this VMID.
|
boolean |
equals(Object obj)
Check if the given object is equal to this VMID.
|
byte[] |
getAddress()
Get the address portion of this VMID.
|
static VMID |
getInstance()
Get the VMID for the current virtual machine.
|
PID |
getProcessID()
Get the process identifier portion of this VMID.
|
UID |
getUID()
Get the UID portion of this VMID.
|
int |
hashCode()
Return the hash code of this VMID.
|
String |
toString()
Return a string representation of this VMID.
|
protected final byte[] address
protected final PID pid
protected final UID uid
protected final int hashCode
public static final byte[] UNKNOWN_HOST
protected VMID(byte[] address, PID pid, UID uid)
address
- The address of the current virtual machine.pid
- Process identifier.uid
- Unique identifier.For getting a VMID instance reference.
protected VMID(VMID vmid)
vmid
- VMID to copy.public final byte[] getAddress()
public final PID getProcessID()
public final UID getUID()
public String toString()
public final int hashCode()
public boolean equals(Object obj)
A VMID is equals to another VMID if the address, process identifer and UID portions are equal.
public Object clone()
public static String asString()
public static VMID getInstance()
Copyright © 2018 JBoss by Red Hat. All rights reserved.