Package io.vena.bosk.drivers.mongo
Enum Class MongoDriverSettings.FlushMode
java.lang.Object
java.lang.Enum<MongoDriverSettings.FlushMode>
io.vena.bosk.drivers.mongo.MongoDriverSettings.FlushMode
- All Implemented Interfaces:
Serializable,Comparable<MongoDriverSettings.FlushMode>,Constable
- Enclosing class:
- MongoDriverSettings
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe canonical implementation ofBoskDriver.flush(): performs a dummy write to the database, and waits for the corresponding event to arrive in the MongoDB change stream, thereby ensuring that all prior events have already been processed.Experimental -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static MongoDriverSettings.FlushMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ECHO
The canonical implementation ofBoskDriver.flush(): performs a dummy write to the database, and waits for the corresponding event to arrive in the MongoDB change stream, thereby ensuring that all prior events have already been processed.Since this mode performs a write, it needs write permissions to the database, and causes change stream activity even when the bosk state is not changing.
-
REVISION_FIELD_ONLY
ExperimentalReads the
revision fieldin the database; if we have not yet processed that revision, wait until we have.This implementation is more complex and subtle than
ECHO, but doesn't perform any writes. When the bosk is not changing, this doesn't need to wait for any change stream events, and runs as quickly as a single database read.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-