Class LeaseStoreMachineIdDistributor

java.lang.Object
me.ahoo.cosid.machine.AbstractMachineIdDistributor
me.ahoo.cosid.machine.lease.LeaseStoreMachineIdDistributor
All Implemented Interfaces:
MachineIdDistribute, MachineIdDistributor

public class LeaseStoreMachineIdDistributor extends AbstractMachineIdDistributor
A MachineIdDistributor on top of a MachineLeaseStore, through MachineLeaseManager.

It reuses everything AbstractMachineIdDistributor provides: local state, the clock-backwards watermark, and the guarder and fail-fast lease on top. It keeps the current Lease of every instance it distributed, so that guard and revert are compare-and-set on the version it last wrote.

Since:
3.4.0