ObjectStore
provides the protocol for reactively persisting and reconstituting objects. Storing objects has the advantage of searching for given instances by any number of their attributes/properties, effectively as if the objects are living in memory with only the need to ask for them by means of partial state characteristics. The objects stored are typically state types of Entity/Aggregate instances, which have unique identities. These state types are extenders of the StateObject
abstract base class.ProductState
would be held by the Aggregate ProductActor
, where the actor implements the Product
protocol.ObjectStore
implementation.ObjectStore
implementation for Apache Geode. Apache Geode is an in-memory data fabric, compute grid, and distributed cache, which can hold object states.ObjectEntity
, there is no need to learn the operations of the ObjectStore
. You get all storage persistence for free when you use the ObjectEntity
abstract base types. Yet, you must still set up your backing database mechanism, including your chosen ORM configurations. We do not cover ORM details here.ObjectStore
protocol extends ObjectStoreReader
and ObjectStoreWriter
, defining a single message type in addition: close()
.ObjectStoreWriter
. It is composed of a number of variations of persist()
and persistAll()
message types, with differences being in the number of parameters supported in each. The richest form of the two message types follow.T persistentObject
T
is a subclass of PersistentObject
, which has two attributes: long persistenceId
and long version
, and serves as the means to persist the corresponding object with a primary key of persistenceId
and a version
indicating how many times the object has be modified.Collection<T> persistentObjects
T persistentObject
, but as a collection of one or more.List<Source<E>> sources
List
of Source
instances, which are concrete subclasses of DomainEvent
, Command
, or ProcessMessage
(see XOOM Lattice for details).Metadata metadata
long updateId
-1L
if it is a creation, not an update, operation. A non-negative updateId
will have been provided with the result of a read query. See QueryExpression
and its QueryMode
, which will be either ReadOnly
or ReadUpdate
.PersistResultInterest interest
Actor
that will receive indication of the results following the persistence operation. During tests this protocol may be mocked as a plain object, but must be designed for concurrent access (see AccessSafely
). See below for the definition of this protocol.Object object
PersistResultInterest
. It may be null
or a valid instance of any application (or service) defined type.ObjectStoreWriter
, the sender must provide an Actor
or mocked test object that implements the PersistResultInterest
protocol.ObjectStoreReader
protocol. It provides a number of query methods, with variations on required and optional parameters.QueryExpression expression
QueryResultInterest interest
Actor
that will receive indication of the results following the query operation. During tests this protocol may be mocked as a plain object, but must be designed for concurrent access (see AccessSafely
). See below for the definition of this protocol.Object object
QueryResultInterest
. It may be null
or a valid instance of any application (or service) defined type.QueryExpression
is defined as follows. There are two extensions of the basic QueryExpression
, which are ListQueryExpression
and MapQueryExpression
.QueryExpression
is a single parameterless expression. The parameters of a ListQueryExpression
are ordered for setting as positional parameters 1, 2, 3, etc., or as a list of comma delimited parameters. The MapQueryExpression
parameters are named using the String
map keys, with the corresponding values to be set in the query expression, such as expression target :id
matched with key "id"
and value "8d8acfe97a"
.ObjectStoreReader
, the sender must provide an Actor
or mocked test object that implements the QueryResultInterest
protocol.Outcome
may be a StorageException
or a successful Result
. The QueryMultiResults
holds a collection of resulting objects and QuerySingleResult
holds a single object result.ObjectStore
.xoom-symbio
xoom-symbio-geode
ObjectStore
for Apache Geode.xoom-symbio-jdbc