Package me.ahoo.cosid.jdbc
Class JdbcMachineIdDistributor
java.lang.Object
me.ahoo.cosid.machine.AbstractMachineIdDistributor
me.ahoo.cosid.jdbc.JdbcMachineIdDistributor
- All Implemented Interfaces:
MachineIdDistributor
Jdbc MachineId 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
ConstructorDescriptionJdbcMachineIdDistributor
(DataSource dataSource, MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer) -
Method Summary
Modifier and TypeMethodDescriptionprotected MachineState
distributeRemote
(String namespace, int machineBit, InstanceId instanceId, Duration safeGuardDuration) 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
-
JdbcMachineIdDistributor
public JdbcMachineIdDistributor(DataSource dataSource, MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer)
-
-
Method Details
-
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
-