public class ChannelId extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ID_LENGTH |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static ChannelId |
from(byte[] idBytes) |
static ChannelId |
from(String id) |
static String |
genIdStr(int fromTaskId,
int toTaskId,
long ts)
Generate channel name, which will be
ID_LENGTH character |
static String |
genRandomIdStr()
Returns a random channel id string
|
long |
getAddress() |
ByteBuffer |
getBuffer() |
byte[] |
getBytes() |
long |
getNativeIdPtr() |
int |
hashCode() |
static String |
idBytesToStr(byte[] id) |
static byte[] |
idStrToBytes(String id) |
String |
toString() |
public static final int ID_LENGTH
public static ChannelId from(String id)
id - hex string representation of channel idpublic static ChannelId from(byte[] idBytes)
idBytes - bytes representation of channel idpublic static String genRandomIdStr()
public static String genIdStr(int fromTaskId, int toTaskId, long ts)
ID_LENGTH characterfromTaskId - upstream task idtoTaskId - downstream task idpublic static byte[] idStrToBytes(String id)
id - hex string representation of channel idpublic static String idBytesToStr(byte[] id)
id - bytes representation of channel idpublic byte[] getBytes()
public ByteBuffer getBuffer()
public long getAddress()
public long getNativeIdPtr()
Copyright © 2021. All rights reserved.