Class CheckpointConfig
java.lang.Object
com.azure.spring.messaging.eventhubs.core.checkpoint.CheckpointConfig
Checkpoint config to describe different checkpoint strategies.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct aCheckpointConfigwith theCheckpointMode.RECORDmode.Construct aCheckpointConfigwith the specifiedCheckpointModemode.CheckpointConfig(CheckpointMode mode, Integer count) Construct aCheckpointConfigwith the specifiedCheckpointModemode and the amount of messages for each partition to do one checkpoint.CheckpointConfig(CheckpointMode mode, Integer count, Duration interval) Construct aCheckpointConfigwith the specifiedCheckpointModemode, the amount of messages for each partition to do one checkpoint and the time interval to do one checkpoint.CheckpointConfig(CheckpointMode mode, Duration duration) Construct aCheckpointConfigwith the specifiedCheckpointModemode and the time interval to do one checkpoint. -
Method Summary
Modifier and TypeMethodDescriptiongetCount()Get the amount of message for each partition to do one checkpoint.Get the time interval to do one checkpoint.getMode()Get the checkpoint mode.voidSet the amount of message for each partition to do one checkpoint.voidsetInterval(Duration interval) Set the time interval to do one checkpoint.voidsetMode(CheckpointMode mode) Set the checkpoint mode.
-
Constructor Details
-
CheckpointConfig
public CheckpointConfig()Construct aCheckpointConfigwith theCheckpointMode.RECORDmode. -
CheckpointConfig
Construct aCheckpointConfigwith the specifiedCheckpointModemode.- Parameters:
mode- the checkpoint mode.
-
CheckpointConfig
Construct aCheckpointConfigwith the specifiedCheckpointModemode and the amount of messages for each partition to do one checkpoint.- Parameters:
mode- the specifiedCheckpointModemode.count- the amount of messages for each partition to do one checkpoint, it will be effective only whenCheckpointMode.PARTITION_COUNTis configured.
-
CheckpointConfig
Construct aCheckpointConfigwith the specifiedCheckpointModemode and the time interval to do one checkpoint.- Parameters:
mode- the specifiedCheckpointModemode.duration- the time interval to do one checkpoint, it will be effective only whenCheckpointMode.TIMEis configured.
-
CheckpointConfig
Construct aCheckpointConfigwith the specifiedCheckpointModemode, the amount of messages for each partition to do one checkpoint and the time interval to do one checkpoint.- Parameters:
mode- the specifiedCheckpointModemode.count- the amount of messages for each partition to do one checkpoint, it will be effective only whenCheckpointMode.PARTITION_COUNTis configured.interval- the time interval to do one checkpoint, it will be effective only whenCheckpointMode.TIMEis configured.
-
-
Method Details
-
getMode
Get the checkpoint mode.- Returns:
- the checkpoint mode.
-
setMode
Set the checkpoint mode.- Parameters:
mode- the checkpoint mode.
-
getCount
Get the amount of message for each partition to do one checkpoint.- Returns:
- the amount of message for each partition to do one checkpoint.
-
setCount
Set the amount of message for each partition to do one checkpoint.- Parameters:
count- the amount of message for each partition to do one checkpoint.
-
getInterval
Get the time interval to do one checkpoint.- Returns:
- the time interval to do one checkpoint.
-
setInterval
Set the time interval to do one checkpoint.- Parameters:
interval- the time interval to do one checkpoint.
-