Class StateReplication
- java.lang.Object
-
- io.camunda.zeebe.broker.system.partitions.impl.StateReplication
-
- All Implemented Interfaces:
SnapshotReplication,AutoCloseable
public final class StateReplication extends Object implements SnapshotReplication
-
-
Constructor Summary
Constructors Constructor Description StateReplication(PartitionMessagingService messagingService, int partitionId, int nodeId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconsume(Consumer<SnapshotChunk> consumer)Registers an consumer, which should be called when an snapshot chunk was received.voidreplicate(SnapshotChunk chunk)Replicates the given snapshot chunk.
-
-
-
Constructor Detail
-
StateReplication
public StateReplication(PartitionMessagingService messagingService, int partitionId, int nodeId)
-
-
Method Detail
-
replicate
public void replicate(SnapshotChunk chunk)
Description copied from interface:SnapshotReplicationReplicates the given snapshot chunk.- Specified by:
replicatein interfaceSnapshotReplication- Parameters:
chunk- the chunk to replicate
-
consume
public void consume(Consumer<SnapshotChunk> consumer)
Description copied from interface:SnapshotReplicationRegisters an consumer, which should be called when an snapshot chunk was received.- Specified by:
consumein interfaceSnapshotReplication- Parameters:
consumer- the consumer which should be called
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-