All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ebe-atomix-cluster.8.7.0-alpha1.source-code.raft-entry-schema.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sbe:messageSchema xmlns:sbe="http://fixprotocol.io/2016/sbe"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  package="io.atomix.raft.storage.serializer" id="8" version="4"
  semanticVersion="0.1.0" description="Raft Entry" byteOrder="littleEndian"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://fixprotocol.io/2016/sbe http://fixprotocol.io/2016/sbe/sbe.xsd">

  <xi:include href="../../../../../protocol/src/main/resources/common-types.xml"/>

  <types>
    <enum name="MemberType" encodingType="uint8">
      <validValue name="INACTIVE">0</validValue>
      <validValue name="PASSIVE">1</validValue>
      <validValue name="PROMOTABLE">2</validValue>
      <validValue name="ACTIVE">3</validValue>
    </enum>
  </types>

  <!--  Raft log entries -->
  <types>
    <enum name="EntryType" encodingType="uint8">
      <validValue name="ApplicationEntry">0</validValue>
      <validValue name="ConfigurationEntry">1</validValue>
      <validValue name="InitialEntry">2</validValue>
    </enum>
  </types>

  <types>
    <!-- binary data -->
    <composite name="blob">
      <type name="length" primitiveType="uint32" maxValue="2147483647"/>
      <type name="varData" primitiveType="uint8" length="0"/>
    </composite>

  </types>

  <sbe:message name="RaftLogEntry" id="1">
    <field name="term" id="0" type="uint64"/>
    <field name="type" id="1" type="EntryType"/>
  </sbe:message>

  <sbe:message name="ApplicationEntry" id="2">
    <field name="lowestAsqn" id="0" type="uint64"/>
    <field name="highestAsqn" id="1" type="uint64"/>
    <data name="applicationData" id="2" type="blob"/>
  </sbe:message>

  <sbe:message name="ConfigurationEntry" id="4">
    <field name="timestamp" id="1" type="uint64"/>
    <group name="newMembers" id="2">
      <field name="type" id="1" type="MemberType"/>
      <field name="updated" id="2" type="int64"/>
      <data name="memberId" id="3" type="varDataEncoding"/>
    </group>
    <group name="oldMembers" id="3" sinceVersion="2">
      <field name="type" id="1" type="MemberType"/>
      <field name="updated" id="2" type="int64"/>
      <data name="memberId" id="3" type="varDataEncoding"/>
    </group>
  </sbe:message>

  <!-- MetaStore -->
  <sbe:message name="Configuration" id="5">
    <field name="index" id="0" type="uint64"/>
    <field name="term" id="1" type="uint64"/>
    <field name="timestamp" id="2" type="uint64"/>
    <field name="force" id="5" type="BooleanType" sinceVersion="3"/>
    <group name="newMembers" id="3">
      <field name="type" id="1" type="MemberType"/>
      <field name="updated" id="2" type="int64"/>
      <data name="memberId" id="3" type="varDataEncoding"/>
    </group>
    <group name="oldMembers" id="4" sinceVersion="2">
      <field name="type" id="1" type="MemberType"/>
      <field name="updated" id="2" type="int64"/>
      <data name="memberId" id="3" type="varDataEncoding"/>
    </group>
  </sbe:message>

  <sbe:message name="Meta" id="6">
    <field name="term" id="0" type="uint64"/>
    <field name="lastFlushedIndex" id="1" type="uint64"/>
    <field name="commitIndex" id="3" type="uint64" sinceVersion="4"/>
    <data name="votedFor" id="2" type="varDataEncoding"/>
  </sbe:message>

</sbe:messageSchema>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy