Package me.ahoo.cosid.machine
Class ManualMachineIdDistributor
java.lang.Object
me.ahoo.cosid.machine.AbstractMachineIdDistributor
me.ahoo.cosid.machine.ManualMachineIdDistributor
- All Implemented Interfaces:
MachineIdDistributor
Manual Machine Id Distributor.
-
Field Summary
Fields inherited from class me.ahoo.cosid.machine.AbstractMachineIdDistributor
NOT_FOUND_LAST_STAMP
Fields inherited from interface me.ahoo.cosid.machine.MachineIdDistributor
FOREVER_SAFE_GUARD_DURATION
-
Constructor Summary
ConstructorDescriptionManualMachineIdDistributor
(int machineId, MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer) -
Method Summary
Modifier and TypeMethodDescriptionprotected MachineState
distributeRemote
(String namespace, int machineBit, InstanceId instanceId, Duration safeGuardDuration) int
protected void
guardRemote
(String namespace, InstanceId instanceId, MachineState machineState, Duration safeGuardDuration) protected void
revertRemote
(String namespace, InstanceId instanceId, MachineState machineState) Methods inherited from class me.ahoo.cosid.machine.AbstractMachineIdDistributor
distribute, guard, revert
-
Constructor Details
-
ManualMachineIdDistributor
public ManualMachineIdDistributor(int machineId, MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer)
-
-
Method Details
-
getMachineId
public int getMachineId() -
distributeRemote
protected MachineState distributeRemote(String namespace, int machineBit, InstanceId instanceId, Duration safeGuardDuration) - Specified by:
distributeRemote
in classAbstractMachineIdDistributor
-
revertRemote
- Specified by:
revertRemote
in classAbstractMachineIdDistributor
-
guardRemote
protected void guardRemote(String namespace, InstanceId instanceId, MachineState machineState, Duration safeGuardDuration) - Specified by:
guardRemote
in classAbstractMachineIdDistributor
-