Package me.ahoo.cosid.machine.k8s
Class StatefulSetMachineIdDistributor
java.lang.Object
me.ahoo.cosid.machine.AbstractMachineIdDistributor
me.ahoo.cosid.machine.k8s.StatefulSetMachineIdDistributor
- All Implemented Interfaces:
MachineIdDistributor
StatefulSet MachineId Distributor.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final StatefulSetMachineIdDistributor
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
ConstructorDescriptionStatefulSetMachineIdDistributor
(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) static int
protected void
revertRemote
(String namespace, InstanceId instanceId, MachineState machineState) Methods inherited from class me.ahoo.cosid.machine.AbstractMachineIdDistributor
distribute, guard, revert
-
Field Details
-
INSTANCE
-
HOSTNAME_KEY
- See Also:
-
-
Constructor Details
-
StatefulSetMachineIdDistributor
public StatefulSetMachineIdDistributor(MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer)
-
-
Method Details
-
resolveMachineId
public static int resolveMachineId() -
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
-