public interface StorageFactory
extends java.lang.AutoCloseable
EventStore
and Stand
.Modifier and Type | Method and Description |
---|---|
<I> AggregateStorage<I> |
createAggregateStorage(ContextSpec context,
java.lang.Class<? extends Aggregate<I,?,?>> aggregateClass)
Creates a new
AggregateStorage . |
CatchUpStorage |
createCatchUpStorage(boolean multitenant)
Creates a new
CatchUpStorage . |
default EventStore |
createEventStore(ContextSpec context)
Creates a new
EventStore . |
InboxStorage |
createInboxStorage(boolean multitenant)
Creates a new
InboxStorage . |
<I> ProjectionStorage<I> |
createProjectionStorage(ContextSpec context,
java.lang.Class<? extends Projection<I,?,?>> projectionClass)
Creates a new
ProjectionStorage . |
<I> RecordStorage<I> |
createRecordStorage(ContextSpec context,
java.lang.Class<? extends Entity<I,?>> entityClass)
Creates a new
RecordStorage . |
<I> AggregateStorage<I> createAggregateStorage(ContextSpec context, java.lang.Class<? extends Aggregate<I,?,?>> aggregateClass)
AggregateStorage
.I
- the type of aggregate IDscontext
- specification of the Bounded Context AggregateRepository
of which
requests the creation of the storageaggregateClass
- the class of Aggregate
s to be stored<I> RecordStorage<I> createRecordStorage(ContextSpec context, java.lang.Class<? extends Entity<I,?>> entityClass)
RecordStorage
.I
- the type of entity IDscontext
- specification of the Bounded Context RecordBasedRepository
of which
requests the creation of the storageentityClass
- the class of entities to be stored<I> ProjectionStorage<I> createProjectionStorage(ContextSpec context, java.lang.Class<? extends Projection<I,?,?>> projectionClass)
ProjectionStorage
.I
- the type of stream projection IDscontext
- specification of the Bounded Context ProjectionRepository
of which
requests the creation of the storageprojectionClass
- the class of Projection
s to be storedInboxStorage createInboxStorage(boolean multitenant)
InboxStorage
.
The instance of InboxStorage
is used in the Delivery
operations. Therefore there is typically just
a single instance of InboxStorage
per ServerEnvironment
instance, unlike other Storage
types which instances are created
per-BoundedContext
.
multitenant
- whether the created storage should be multi-tenantCatchUpStorage createCatchUpStorage(boolean multitenant)
CatchUpStorage
.
Similar to InboxStorage
, this type of storage is also used in the Delivery
routines. So by default there is a single
instance of CatchUpStorage
per ServerEnvironment
.
multitenant
- whether the created storage should be multi-tenantdefault EventStore createEventStore(ContextSpec context)
EventStore
.context
- specification of the Bounded Context events of which the store would serve