StateAdapter<S,RS>
DefaultTextStateAdapter
StateAdapter
used when no type-specific adapter is registered with the StateAdapterProvider
.StateAdapterProvider
StateAdapter
instances by state type, as well as adapter behaviors using type lookups.State<T>
BinaryState
State<byte[]>
.ObjectState
State<Object>
.TextState
State<String>
.EntryAdapter<S,E>
DefaultTextEntryAdapter
EntryAdapter
used when no type-specific adapter is registered with the EntryAdapterProvider
.EntryAdapterProvider
EntryAdapter
instances by source type, as well as adapter behaviors using type lookups.Entry<T>
Journal<T>
. A journal entry may be a serialized Source<T>
concrete implementation such as those defined in XOOM Lattice: Command
, DomainEvent
, and ProcessMessage
, and others.BaseEntry<T>
BinaryEntry
Entry<byte[]>
.ObjectEntry
Entry<Object>
.TextEntry
Entry<String>
.NullEntry
Entry<byte[]>
, Entry<Object>
, and Entry<String>
.DomainEvent
and/or Command
types change, you will need to replace the defaults with your own implementations.StateAdapter
and EntryAdapter
types for both State
and Entry
. These default adapters will be used automatically when the service or application has not registered a custom adapter for a given state or source type. This means that you do not need to register these default adapters with the StateAdapterProvider
or the EntryAdapterProvider
.DefaultTextStateAdapter
and the DefaultTextEntryAdapter
. Because these are default adapters you will not need to import them into your main code, although the import statements are shown here for clarity.State
and Entry
types are TextState
and TextEntry
, respectively. They also deserialize from TextState
and TextEntry
back to service and application object state.StateAdapter
.ProductStateAdapter
is responsible for adapting from the Product
service/application object state to what is called the raw state and back again from raw state to the Product
service/application state.toRawState()
.fromRawState()
.typeVersion()
, that provides the current version of the operational state type. This specific implementation indicates version 1
. This version may also be encoded as a SemanticVersion
, as is provided with XOOM Common.public final int typeVersion
in State<T>
. (This is an immutable variable and does not require an accessor method.)EntryAdapter
for the CartInitialized
event.EntryAdapter
implementations as for StateAdapter
.World
. The registration is a means to avoid the use of static variables to hold the adapter providers. It also makes it convenient for the various XOOM Symbio storage mechanisms to access the adapters when moving data into and out of the underlying databases.DomainEvent
and Command
types) must be exchanged across collaborating services and establish their schemas in the XOOM Schemata schema registry.