Package me.ahoo.cosid.mongo
Interface MachineCollection
- All Known Implementing Classes:
MongoMachineCollection
,MongoReactiveMachineCollection
public interface MachineCollection
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondistribute
(String namespace, int machineBit, InstanceId instanceId) distributeByRevert
(String namespace, InstanceId instanceId, Duration safeGuardDuration) distributeBySelf
(String namespace, InstanceId instanceId, Duration safeGuardDuration) void
guard
(String namespace, InstanceId instanceId, MachineState machineState, Duration safeGuardDuration) int
nextMachineId
(String namespace) void
revert
(String namespace, InstanceId instanceId, MachineState machineState)
-
Field Details
-
COLLECTION_NAME
- See Also:
-
-
Method Details
-
nextMachineId
-
distribute
-
distributeByRevert
MachineState distributeByRevert(String namespace, InstanceId instanceId, Duration safeGuardDuration) -
distributeBySelf
-
revert
void revert(String namespace, InstanceId instanceId, MachineState machineState) throws MachineIdLostException - Throws:
MachineIdLostException
-
guard
void guard(String namespace, InstanceId instanceId, MachineState machineState, Duration safeGuardDuration) throws MachineIdLostException - Throws:
MachineIdLostException
-