public class VMID extends Object implements Serializable, Cloneable
The identifier is composed of:
[ address ] - [ process id ] - [ time ] - [ counter ]
|------- UID --------|
Numbers are converted to radix(Character.MAX_RADIX) when converting to strings.
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
address
The address of the current virtual machine
|
protected int |
hashCode
The hash code of this VMID
|
protected String |
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.
|
| 构造器和说明 |
|---|
VMID(byte[] address,
String pid,
UID uid)
Construct a new VMID.
|
VMID(VMID vmid)
Copy a VMID.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
String |
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 String pid
protected final UID uid
protected final int hashCode
public static final byte[] UNKNOWN_HOST
public VMID(byte[] address,
String pid,
UID uid)
address - The address of the current virtual machine.pid - Process identifier.uid - Unique identifier.For getting a VMID instance reference.public VMID(VMID vmid)
vmid - VMID to copy.public final byte[] getAddress()
public final String 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 © 2021. All rights reserved.