Class Partition

java.lang.Object
io.camunda.zeebe.broker.partitioning.Partition

public final class Partition extends Object
Represents the combination of a Raft and Zeebe partition. For now, the only way to construct partitions is through the bootstrapping(PartitionStartupContext) method.
   final var context = new PartitionStartupContext(...);
   final var partition = Partition.bootstrapping(context);

   partition.start().join();
   partition.stop().join();
 
  • Method Details

    • bootstrapping

      public static Partition bootstrapping(PartitionStartupContext context)
      Creates a partition that uses the bootstrapping process when started. Bootstrapping assumes that this broker is already part of the replication group for this partition. If the broker does not have the partition configuration stored locally, the initial configuration is derived from the static broker configuration.
      Parameters:
      context - a populated context that the partition can use.
      Returns:
      a partition that can be started.
    • joining

      public static Partition joining(PartitionStartupContext context)
    • start

      public ActorFuture<Partition> start()
    • stop

      public ActorFuture<Partition> stop()
    • zeebePartition

      public ZeebePartition zeebePartition()
    • raftPartition

      public RaftPartition raftPartition()
    • id

      public int id()