Class MachineProperties.ClockBackwards
java.lang.Object
me.ahoo.cosid.spring.boot.starter.machine.MachineProperties.ClockBackwards
- Enclosing class:
- MachineProperties
Configuration for clock backwards synchronization.
This configuration controls how the system handles clock drift and backwards time adjustments, which can cause ID generation issues in distributed systems.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the broken threshold for clock validation.intGets the spin threshold for clock synchronization.voidsetBrokenThreshold(int brokenThreshold) Sets the broken threshold for clock validation.voidsetSpinThreshold(int spinThreshold) Sets the spin threshold for clock synchronization.
-
Constructor Details
-
ClockBackwards
public ClockBackwards()
-
-
Method Details
-
getSpinThreshold
public int getSpinThreshold()Gets the spin threshold for clock synchronization.- Returns:
- the spin threshold value
-
setSpinThreshold
public void setSpinThreshold(int spinThreshold) Sets the spin threshold for clock synchronization.- Parameters:
spinThreshold- the spin threshold to set
-
getBrokenThreshold
public int getBrokenThreshold()Gets the broken threshold for clock validation.- Returns:
- the broken threshold value
-
setBrokenThreshold
public void setBrokenThreshold(int brokenThreshold) Sets the broken threshold for clock validation.- Parameters:
brokenThreshold- the broken threshold to set
-