Package me.ahoo.cosid.mongo
Interface MachineOperates
public interface MachineOperates
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bson.conversions.Bson
distributeByRevertFilter
(String namespace, InstanceId instanceId, Duration safeGuardDuration) static org.bson.conversions.Bson
distributeByRevertUpdate
(InstanceId instanceId, long lastTimestamp) static org.bson.conversions.Bson
distributeBySelfFilter
(String namespace, InstanceId instanceId, Duration safeGuardDuration) static org.bson.conversions.Bson
distributeBySelfUpdate
(long lastTimestamp) static org.bson.Document
distributeDocument
(String namespace, InstanceId instanceId, MachineState nextMachineState) static org.bson.conversions.Bson
guardFilter
(String namespace, InstanceId instanceId, MachineState machineState) static org.bson.conversions.Bson
guardUpdate
(long lastTimestamp) static List<? extends org.bson.conversions.Bson>
nextMachineIdPipeline
(String namespace) static org.bson.conversions.Bson
revertFilter
(String namespace, InstanceId instanceId, MachineState machineState) static org.bson.conversions.Bson
revertUpdate
(InstanceId instanceId, MachineState machineState)
-
Field Details
-
NAMESPACE_FIELD
- See Also:
-
MACHINE_ID_FIELD
- See Also:
-
LAST_TIMESTAMP_FIELD
- See Also:
-
INSTANCE_ID_FIELD
- See Also:
-
DISTRIBUTE_TIME_FIELD
- See Also:
-
REVERT_TIME_FIELD
- See Also:
-
MAX_MACHINE_ID_FIELD
- See Also:
-
-
Method Details
-
nextMachineIdPipeline
-
distributeDocument
static org.bson.Document distributeDocument(String namespace, InstanceId instanceId, MachineState nextMachineState) -
distributeByRevertFilter
static org.bson.conversions.Bson distributeByRevertFilter(String namespace, InstanceId instanceId, Duration safeGuardDuration) -
distributeByRevertUpdate
static org.bson.conversions.Bson distributeByRevertUpdate(InstanceId instanceId, long lastTimestamp) -
distributeBySelfFilter
static org.bson.conversions.Bson distributeBySelfFilter(String namespace, InstanceId instanceId, Duration safeGuardDuration) -
distributeBySelfUpdate
static org.bson.conversions.Bson distributeBySelfUpdate(long lastTimestamp) -
revertFilter
static org.bson.conversions.Bson revertFilter(String namespace, InstanceId instanceId, MachineState machineState) -
revertUpdate
-
guardFilter
static org.bson.conversions.Bson guardFilter(String namespace, InstanceId instanceId, MachineState machineState) -
guardUpdate
static org.bson.conversions.Bson guardUpdate(long lastTimestamp)
-