Package io.ray.api.id
Class UniqueId
java.lang.Object
io.ray.api.id.BaseId
io.ray.api.id.UniqueId
- All Implemented Interfaces:
Serializable
Represents a unique id of all Ray concepts, including workers, actors, checkpoints, etc.
- See Also:
- Serialized Form
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UniqueIdfromByteBuffer(ByteBuffer bb)Creates a UniqueId from a ByteBuffer.static UniqueIdfromHexString(String hex)Create a UniqueId from a hex string.static UniqueIdrandomId()Generate an UniqueId with random value.intsize()Derived class should implement this function.Methods inherited from class io.ray.api.id.BaseId
byteBuffer2Bytes, equals, getBytes, hashCode, hexString2Bytes, isNil, toByteBuffer, toString
-
Field Details
-
LENGTH
public static final int LENGTH- See Also:
- Constant Field Values
-
NIL
-
-
Constructor Details
-
UniqueId
public UniqueId(byte[] id)
-
-
Method Details
-
fromHexString
Create a UniqueId from a hex string. -
fromByteBuffer
Creates a UniqueId from a ByteBuffer. -
randomId
Generate an UniqueId with random value. -
size
public int size()Description copied from class:BaseIdDerived class should implement this function.
-