Package me.ahoo.cosid.machine
Class DefaultClockBackwardsSynchronizer
java.lang.Object
me.ahoo.cosid.machine.DefaultClockBackwardsSynchronizer
- All Implemented Interfaces:
ClockBackwardsSynchronizer
Default Clock Backwards Synchronizer.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
Fields inherited from interface me.ahoo.cosid.machine.ClockBackwardsSynchronizer
DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sync
(long lastTimestamp) void
syncUninterruptibly
(long lastTimestamp)
-
Field Details
-
DEFAULT_SPIN_THRESHOLD
public static final int DEFAULT_SPIN_THRESHOLD- See Also:
-
DEFAULT_BROKEN_THRESHOLD
public static final int DEFAULT_BROKEN_THRESHOLD- See Also:
-
-
Constructor Details
-
DefaultClockBackwardsSynchronizer
public DefaultClockBackwardsSynchronizer() -
DefaultClockBackwardsSynchronizer
public DefaultClockBackwardsSynchronizer(int spinThreshold, int brokenThreshold)
-
-
Method Details
-
sync
- Specified by:
sync
in interfaceClockBackwardsSynchronizer
- Throws:
InterruptedException
ClockTooManyBackwardsException
-
syncUninterruptibly
- Specified by:
syncUninterruptibly
in interfaceClockBackwardsSynchronizer
- Throws:
ClockTooManyBackwardsException
-