Package io.camunda.zeebe.protocol
Class Protocol
java.lang.Object
io.camunda.zeebe.protocol.Protocol
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBy convention, the partition to deploy tostatic final ByteOrderThe endianness of multibyte values encoded in the protocol.static final intKeyspace is defined for each partition.static final longstatic final intThe partition space is derived from the keyspace and the maximum bytes of long.static final intstatic final StringPrefix for key of reserved task headersstatic final intId of the first partition.static final StringTask header key used for assigneestatic final StringTask header key used for candidate groupsstatic final StringTask header key used for candidate usersstatic final StringTask header key used for due datestatic final StringTask header key used for follow-up datestatic final StringTask header key used for user tasks to contain form key from BPMN XMLstatic final StringJob typ used for user tasks handled by Camunda Cloud Tasklist -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longdecodeKeyInPartition(long key) static intdecodePartitionId(long key) static longencodePartitionId(int partitionId, long key)
-
Field Details
-
PROTOCOL_VERSION
public static final int PROTOCOL_VERSION- See Also:
-
ENDIANNESS
The endianness of multibyte values encoded in the protocol. This MUST match the default byte order in the SBE XML schema. -
DEPLOYMENT_PARTITION
public static final int DEPLOYMENT_PARTITIONBy convention, the partition to deploy to- See Also:
-
START_PARTITION_ID
public static final int START_PARTITION_IDId of the first partition. partition ids are in the range(START_PARTITION_ID, START_PARTITION_ID + partitionCount)- See Also:
-
PARTITION_BITS
public static final int PARTITION_BITSThe partition space is derived from the keyspace and the maximum bytes of long.partitionSpace = 2^64 - KEYSPACE
- See Also:
-
MAXIMUM_PARTITIONS
public static final long MAXIMUM_PARTITIONS- See Also:
-
KEY_BITS
public static final int KEY_BITSKeyspace is defined for each partition. To define the keyspace size, the maximum events, which can be written to the dispatcher implementation, has to be calculated.If we change or replace the dispatcher implementation we should check if the current defined key space size is still valid.
Calculation is done as follows:
On each segment 2^32 bytes can be written, we can have 2^32 segments. This means we can at maximum write 2*32 * 2^32 = 18446744073709551616 bytes. If we assume an avg event size of 15_000 bytes (due to variables and so on) we can calculate the maximum events which can be written to the dispatcher. `maximumEvents = maximumBytes / eventAvgSize = 1229782938247303.5` We can then calculate the min pow of 2 to reach this value like: log(2, 1229782938247303.5). This means we need a keyspace of 2^51 to have more keys then possible writable events.
- See Also:
-
USER_TASK_JOB_TYPE
Job typ used for user tasks handled by Camunda Cloud Tasklist- See Also:
-
RESERVED_HEADER_NAME_PREFIX
Prefix for key of reserved task headers- See Also:
-
USER_TASK_FORM_KEY_HEADER_NAME
Task header key used for user tasks to contain form key from BPMN XML- See Also:
-
USER_TASK_ASSIGNEE_HEADER_NAME
Task header key used for assignee- See Also:
-
USER_TASK_CANDIDATE_GROUPS_HEADER_NAME
Task header key used for candidate groups- See Also:
-
USER_TASK_CANDIDATE_USERS_HEADER_NAME
Task header key used for candidate users- See Also:
-
USER_TASK_DUE_DATE_HEADER_NAME
Task header key used for due date- See Also:
-
USER_TASK_FOLLOW_UP_DATE_HEADER_NAME
Task header key used for follow-up date- See Also:
-
-
Constructor Details
-
Protocol
public Protocol()
-
-
Method Details
-
encodePartitionId
public static long encodePartitionId(int partitionId, long key) -
decodePartitionId
public static int decodePartitionId(long key) -
decodeKeyInPartition
public static long decodeKeyInPartition(long key)
-