Enum Class ModelPersistence
- All Implemented Interfaces:
Serializable, Comparable<ModelPersistence>, Constable
Defines the durable representation and authoritative load path of a
Model.
This choice is independent from event publication and from internal documents used to compose model graphs.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTreat the current document as authoritative and load state directly through the configured document serializer.Reconstruct state from the model event stream and do not maintain a directly searchable current document.Reconstruct state from the event stream and also maintain a directly searchable current document. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether normal loads reconstruct state from stored model events.booleanWhether commits maintain a directly searchable current document.static ModelPersistenceReturns the enum constant of this class with the specified name.static ModelPersistence[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EVENT_SOURCED
Reconstruct state from the model event stream and do not maintain a directly searchable current document. -
EVENT_SOURCED_WITH_DOCUMENT
Reconstruct state from the event stream and also maintain a directly searchable current document. -
DOCUMENT
Treat the current document as authoritative and load state directly through the configured document serializer.
-
-
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
-
isEventSourced
public boolean isEventSourced()Whether normal loads reconstruct state from stored model events. -
storesDocument
public boolean storesDocument()Whether commits maintain a directly searchable current document.
-