Package io.zeebe.protocol
Class Protocol
- java.lang.Object
-
- io.zeebe.protocol.Protocol
-
public final class Protocol extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intDEPLOYMENT_PARTITIONBy convention, the partition to deploy tostatic ByteOrderENDIANNESSThe endianness of multibyte values encoded in the protocol.static intKEY_BITSKeyspace is defined for each partition.static longMAXIMUM_PARTITIONSstatic intPARTITION_BITSThe partition space is derived from the keyspace and the maximum bytes of long.static intPROTOCOL_VERSIONstatic intSTART_PARTITION_IDId of the first partition.static StringUSER_TASK_FORM_KEY_HEADER_NAMETask header key used for user tasks to contain form key from BPMN XMLstatic StringUSER_TASK_JOB_TYPEJob typ used for user tasks handled by Camunda Cloud Tasklist
-
Constructor Summary
Constructors Constructor Description Protocol()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longdecodeKeyInPartition(long key)static intdecodePartitionId(long key)static longencodePartitionId(int partitionId, long key)
-
-
-
Field Detail
-
PROTOCOL_VERSION
public static final int PROTOCOL_VERSION
- See Also:
- Constant Field Values
-
ENDIANNESS
public static final ByteOrder 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_PARTITION
By convention, the partition to deploy to- See Also:
- Constant Field Values
-
START_PARTITION_ID
public static final int START_PARTITION_ID
Id of the first partition. partition ids are in the range(START_PARTITION_ID, START_PARTITION_ID + partitionCount)- See Also:
- Constant Field Values
-
PARTITION_BITS
public static final int PARTITION_BITS
The partition space is derived from the keyspace and the maximum bytes of long.partitionSpace = 2^64 - KEYSPACE
- See Also:
- Constant Field Values
-
MAXIMUM_PARTITIONS
public static final long MAXIMUM_PARTITIONS
- See Also:
- Constant Field Values
-
KEY_BITS
public static final int KEY_BITS
Keyspace 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:
- Constant Field Values
-
USER_TASK_JOB_TYPE
public static final String USER_TASK_JOB_TYPE
Job typ used for user tasks handled by Camunda Cloud Tasklist- See Also:
- Constant Field Values
-
USER_TASK_FORM_KEY_HEADER_NAME
public static final String USER_TASK_FORM_KEY_HEADER_NAME
Task header key used for user tasks to contain form key from BPMN XML- See Also:
- Constant Field Values
-
-