Package fr.gouv.vitam.common.guid
Interface GUID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
compareTo(GUID arg0)
boolean
equals(java.lang.Object o)
byte[]
getBytes()
copy the uuid of this GUID, so that it can't be changed, and return itint
getCounter()
java.lang.String
getId()
byte[]
getMacFragment()
Extract Platform id as bytes.default int
getObjectId()
int
getPlatformId()
Extract Platform id as int.int
getProcessId()
Extract process id and return as intdefault int
getTenantId()
long
getTimestamp()
Extract timestamp and return as longint
getVersion()
extract version field as a hex char from raw GUID bytesint
hashCode()
boolean
isWorm()
java.lang.String
toArk()
default java.lang.String
toArkName()
java.lang.String
toBase32()
java.lang.String
toBase64()
java.lang.String
toHex()
java.lang.String
toString()
-
-
-
Method Detail
-
isWorm
boolean isWorm()
- Returns:
- True if is Worm
-
toBase32
java.lang.String toBase32()
- Returns:
- the Base32 representation (default of toString)
-
toBase64
java.lang.String toBase64()
- Returns:
- the Base64 representation (default of toString)
-
toHex
java.lang.String toHex()
- Returns:
- the Hexadecimal representation
-
toArk
java.lang.String toArk()
- Returns:
- the Ark representation of this GUID
-
toArkName
default java.lang.String toArkName()
- Returns:
- the Ark Name part of Ark representation
-
toString
java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getBytes
byte[] getBytes()
copy the uuid of this GUID, so that it can't be changed, and return it- Returns:
- raw byte array of GUID
-
getVersion
int getVersion()
extract version field as a hex char from raw GUID bytes- Returns:
- version char
-
getObjectId
default int getObjectId()
- Returns:
- the id of the Object Type (default being 0)
-
getTenantId
default int getTenantId()
- Returns:
- the Tenant Id of GUID from which it belongs to (default being 0)
-
getProcessId
int getProcessId()
Extract process id and return as int- Returns:
- id of process that generated the GUID, or -1 for unrecognized format
-
getCounter
int getCounter()
- Returns:
- the associated counter against collision value
-
getTimestamp
long getTimestamp()
Extract timestamp and return as long- Returns:
- millisecond UTC timestamp from generation of the GUID, or -1 for unrecognized format
-
getMacFragment
byte[] getMacFragment()
Extract Platform id as bytes. Could be using partial MAC address.- Returns:
- byte array of GUID fragment, or null for unrecognized format
-
getPlatformId
int getPlatformId()
Extract Platform id as int. Could be using partial MAC address.- Returns:
- the Platform id as int, or -1 for unrecognized format
-
getId
java.lang.String getId()
- Returns:
- the String representation of this GUID
-
equals
boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-