Class ZeebePartition
- java.lang.Object
-
- io.camunda.zeebe.util.sched.Actor
-
- io.camunda.zeebe.broker.system.partitions.ZeebePartition
-
- All Implemented Interfaces:
RaftRoleChangeListener,DiskSpaceUsageListener,CloseableSilently,FailureListener,HealthMonitorable,AsyncClosable,AutoCloseable
public final class ZeebePartition extends Actor implements RaftRoleChangeListener, HealthMonitorable, FailureListener, DiskSpaceUsageListener
-
-
Constructor Summary
Constructors Constructor Description ZeebePartition(PartitionContext context, PartitionTransition transition)
-
Method Summary
-
Methods inherited from class io.camunda.zeebe.util.sched.Actor
buildActorName, buildActorName, close, isActorClosed, onActorClosed, onActorCloseRequested, onActorFailed, wrap
-
-
-
-
Constructor Detail
-
ZeebePartition
public ZeebePartition(PartitionContext context, PartitionTransition transition)
-
-
Method Detail
-
onNewRole
public void onNewRole(RaftServer.Role newRole, long newTerm)
Called by atomix on role change.- Specified by:
onNewRolein interfaceRaftRoleChangeListener- Parameters:
newRole- the new role of the raft partition
-
onActorStarting
public void onActorStarting()
- Overrides:
onActorStartingin classActor
-
onActorStarted
protected void onActorStarted()
- Overrides:
onActorStartedin classActor
-
onActorClosing
protected void onActorClosing()
- Overrides:
onActorClosingin classActor
-
closeAsync
public ActorFuture<Void> closeAsync()
- Specified by:
closeAsyncin interfaceAsyncClosable- Overrides:
closeAsyncin classActor
-
handleFailure
protected void handleFailure(Exception failure)
- Overrides:
handleFailurein classActor
-
onFailure
public void onFailure()
- Specified by:
onFailurein interfaceFailureListener
-
onRecovered
public void onRecovered()
- Specified by:
onRecoveredin interfaceFailureListener
-
onUnrecoverableFailure
public void onUnrecoverableFailure()
- Specified by:
onUnrecoverableFailurein interfaceFailureListener
-
getHealthStatus
public HealthStatus getHealthStatus()
- Specified by:
getHealthStatusin interfaceHealthMonitorable
-
addFailureListener
public void addFailureListener(FailureListener failureListener)
- Specified by:
addFailureListenerin interfaceHealthMonitorable
-
onDiskSpaceNotAvailable
public void onDiskSpaceNotAvailable()
Description copied from interface:DiskSpaceUsageListenerWill be called when disk space usage grows above the threshold- Specified by:
onDiskSpaceNotAvailablein interfaceDiskSpaceUsageListener
-
onDiskSpaceAvailable
public void onDiskSpaceAvailable()
Description copied from interface:DiskSpaceUsageListenerWill be called when disk space usage goes below the threshold after it was above it.- Specified by:
onDiskSpaceAvailablein interfaceDiskSpaceUsageListener
-
pauseProcessing
public ActorFuture<Void> pauseProcessing()
-
resumeProcessing
public void resumeProcessing()
-
getPartitionId
public int getPartitionId()
-
getSnapshotStore
public PersistedSnapshotStore getSnapshotStore()
-
triggerSnapshot
public void triggerSnapshot()
-
getStreamProcessor
public ActorFuture<Optional<StreamProcessor>> getStreamProcessor()
-
getExporterDirector
public ActorFuture<Optional<ExporterDirector>> getExporterDirector()
-
pauseExporting
public ActorFuture<Void> pauseExporting()
-
resumeExporting
public void resumeExporting()
-
-