Class Protocol


  • public final class Protocol
    extends Object
    • Field Detail

      • 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
      • 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
    • Constructor Detail

      • Protocol

        public Protocol()
    • Method Detail

      • encodePartitionId

        public static long encodePartitionId​(int partitionId,
                                             long key)
      • decodePartitionId

        public static int decodePartitionId​(long key)
      • decodeKeyInPartition

        public static long decodeKeyInPartition​(long key)