diff --git a/documentation/src/main/docbook/en-US/reference-guide/5-repositories-and-event-stores.xml b/documentation/src/main/docbook/en-US/reference-guide/5-repositories-and-event-stores.xml index b9ce14e617..09c4d7d1c0 100644 --- a/documentation/src/main/docbook/en-US/reference-guide/5-repositories-and-event-stores.xml +++ b/documentation/src/main/docbook/en-US/reference-guide/5-repositories-and-event-stores.xml @@ -697,16 +697,16 @@ public class AdministrativeDetailsUpdatedUpcaster implements Upcaster<Documen By copying the address and policy element from the - AdministrativeDetailsUpdatedEvent each into its own document, the + AdministrativeDetailsUpdatedEvent each into its own document, the event is upcasted. Deserializing the result would get us an instance of the InsurancePolicyUpdatedEvent and an instance of the - AddressUpdatedEvent. + AddressUpdatedEvent. Upcasting can be expensive, possibly involving type conversion, deserialization and logic. Axon is smart enough to prevent this from happening when it is not neccesary through the concept of - SerializedTypes. SerializedTypes provide Axon with the information + SerializedTypes. SerializedTypes provide Axon with the information to delay event upcasting until the application requires it. @@ -732,41 +732,41 @@ public class AdministrativeDetailsUpdatedUpcaster implements Upcaster<Documen The Upcaster Chain The Upcaster Chain is responsible for upcasting events by chaining the output of - one upcaster to the next. It comes in the following two flavours: + one upcaster to the next. It comes in the following two flavours: The SimpleUpcasterChain immediately upcasts all events given - to it and returns them. + to it and returns them. The LazyUpcasterChain prepares the events to be upcasted but only upcasts the events that are actually used. Whether or not your application needs all events this can give you a significant performance - benefit. In the worst case it's as slow as the SimpleUpcasterChain. The - LazyUpcasterChain does not guarantee that all the events in an Event Stream + benefit. In the worst case it's as slow as the SimpleUpcasterChain. The + LazyUpcasterChain does not guarantee that all the events in an Event Stream are in fact upcasted. When your upcasters rely on information from previous - events, this may be a problem. + events, this may be a problem. - The LazyUpcasterChain is a safe choice if your upcasters are stateless or do not - depend on other upcasters. Always consider using the LazyUpcasterChain since it can - provide a great performance benefit over the SimpleUpcasterChain. If you want - guaranteed upcasting in a strict order, use the SimpleUpcasterChain. + The LazyUpcasterChain is a safe choice if your upcasters are stateless or do not + depend on other upcasters. Always consider using the LazyUpcasterChain since it can + provide a great performance benefit over the SimpleUpcasterChain. If you want + guaranteed upcasting in a strict order, use the SimpleUpcasterChain. Content type conversion An upcaster works on a given content type (e.g. dom4j Document). To provide extra flexibility between upcasters, content types between chained upcasters may vary. Axon will try to convert between the content types automatically by using - ContentTypeConverters. It will search for the shortest path from type x + ContentTypeConverters. It will search for the shortest path from type x to type y, perform the conversion and pass the converted value into the requested upcaster. For performance reasons, conversion will only be performed if the canUpcast method on the receiving upcaster yields true. - The ContentTypeConverters may depend on the type of serializer used. Attempting to - convert a byte[] to a dom4j Document will not make any sence unless a Serializer was - used that writes an event as XML. To make sure the UpcasterChain has access to the - serializer-specific ContentTypeConverters, you can pass a reference to the - serializer to the constructor of the UpcasterChain. + The ContentTypeConverters may depend on the type of serializer used. Attempting to + convert a byte[] to a dom4j Document will not make any sence unless a Serializer was + used that writes an event as XML. To make sure the UpcasterChain has access to the + serializer-specific ContentTypeConverters, you can pass a reference to the + serializer to the constructor of the UpcasterChain. To achieve the best performance, ensure that all upcasters in the same chain (where one's output is another's input) work on the same content type. @@ -869,7 +869,7 @@ public class AdministrativeDetailsUpdatedUpcaster implements Upcaster<Documen your aggregate must either have an accessible default constructor or implement the Serializable interface. - The AbstractSnapshotter provides a basic set of properties that allow you to tweak + The AbstractSnapshotter provides a basic set of properties that allow you to tweak the way snapshots are created: @@ -905,7 +905,7 @@ public class AdministrativeDetailsUpdatedUpcaster implements Upcaster<Documen SpringAggregateSnapshotter, which allows you to configure a PlatformTransactionManager. The SpringAggregateSnapshotter will autowire all aggregate - factories (either directly, or via the Repository), if a list is not explicitly + factories (either directly, or via the Repository), if a list is not explicitly configured. @@ -1018,8 +1018,8 @@ public class AdministrativeDetailsUpdatedUpcaster implements Upcaster<Documen user applied his command first, the second one will make the change to version 5, instead of the version 4 that he expected. This second command will generate a CustomerMovedEvent. This event is compared to all unseen events: AddressCorrectedEvent, - in this case. A ConflictResolver will compare these events, and decide that these - conflicts may be merged. If the other user had committed first, the ConflictResolver + in this case. A ConflictResolver will compare these events, and decide that these + conflicts may be merged. If the other user had committed first, the ConflictResolver would have decided that a AddressCorrectedEvent on top of an unseen CustomerMovedEvent is considered a conflicting change. @@ -1034,7 +1034,7 @@ public class AdministrativeDetailsUpdatedUpcaster implements Upcaster<Documen the EventSourcingRepository. This ConflictResolver is responsible for detecting conflicting modifications, based on the events representing these changes. Detecting these conflicts is a matter of comparing the two lists of - DomainEvents provided in the resolveConflicts method declared on the + DomainEvents provided in the resolveConflicts method declared on the ConflictResolver. If such a conflict is found, a ConflictingModificationException (or better, a more explicit and explanatory subclass of it) must be thrown. If the ConflictResolver returns