|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.upcasting.AbstractUpcasterChain org.axonframework.upcasting.LazyUpcasterChain
public class LazyUpcasterChain
UpcasterChain implementation that delays the actual upcasting until the data inside the returned SerializedObject is actually fetched. This makes this implementation perform better in cases where not all events are used.
Ordering guarantees:SimpleUpcasterChain
instead for these cases.
Constructor Summary | |
---|---|
LazyUpcasterChain(ConverterFactory converterFactory,
List<Upcaster> upcasters)
Initializes the UpcasterChain with given converterFactory and upcasters . |
|
LazyUpcasterChain(List<Upcaster> upcasters)
Initializes the UpcasterChain with given upcasters and a ChainingConverterFactory to
convert between content types. |
|
LazyUpcasterChain(Serializer serializer,
List<Upcaster> upcasters)
Initializes the UpcasterChain with given serializer and upcasters . |
Method Summary | ||
---|---|---|
protected
|
doUpcast(Upcaster<T> upcaster,
SerializedObject<?> sourceObject,
List<SerializedType> targetTypes,
UpcastingContext context)
Performs the actual upcasting by the given upcaster on the given sourceObject . |
Methods inherited from class org.axonframework.upcasting.AbstractUpcasterChain |
---|
ensureCorrectContentType, upcast |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LazyUpcasterChain(List<Upcaster> upcasters)
upcasters
and a ChainingConverterFactory
to
convert between content types.
upcasters
- the upcasters to form the chainpublic LazyUpcasterChain(Serializer serializer, List<Upcaster> upcasters)
serializer
and upcasters
. The
serializer
is used to fetch the ConverterFactory instance it uses. This ConverterFactory is
generally adapted to the exact form of serialization used by the serializer.
serializer
- The serializer used to serialize the dataupcasters
- The upcasters to form this chainpublic LazyUpcasterChain(ConverterFactory converterFactory, List<Upcaster> upcasters)
converterFactory
and upcasters
.
converterFactory
- The factory providing the converters to convert between content typesupcasters
- The upcasters to form this chainMethod Detail |
---|
protected <T> List<SerializedObject<?>> doUpcast(Upcaster<T> upcaster, SerializedObject<?> sourceObject, List<SerializedType> targetTypes, UpcastingContext context)
AbstractUpcasterChain
upcaster
on the given sourceObject
. The
returned list of serialized object must represent the upcast version of the given sourceObject
.
Each item in the returned List of SerializedObject must match the given list of targetTypes
. These
types are returned by the invocation of Upcaster.upcast(org.axonframework.serializer.SerializedType)
.
doUpcast
in class AbstractUpcasterChain
T
- The representation type expected by the upcasterupcaster
- The upcaster to perform the upcasting withsourceObject
- The SerializedObject to upcasttargetTypes
- The types expected in the returned List of SerializedObjectcontext
- The container of properties of the Domain Event Message being upcast
sourceObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |