SystemAwareStorageFactory

public final class SystemAwareStorageFactory implements StorageFactory

An implementation of StorageFactory which may produce an empty EventStore for system context.

Delegates storage creation to another factory.

When asked for a EventStore, creates an EmptyEventStore if the given context does not store events. Otherwise, delegates to the associated delegate factory.

Functions

Link copied to clipboard
public void close()
Closes the associated delegate factory.
Link copied to clipboard
public AggregateStorage<I> createAggregateStorage<I>(ContextSpec context, Class<? extends Aggregate<I, ? extends Object, ? extends Object>> aggregateClass)
Creates a new AggregateStorage.
Link copied to clipboard
public CatchUpStorage createCatchUpStorage(boolean multitenant)
Creates a new CatchUpStorage.
Link copied to clipboard
Creates a new EventStore.
Link copied to clipboard
public InboxStorage createInboxStorage(boolean multitenant)
Creates a new InboxStorage.
Link copied to clipboard
public ProjectionStorage<I> createProjectionStorage<I>(ContextSpec context, Class<? extends Projection<I, ? extends Object, ? extends Object>> projectionClass)
Creates a new ProjectionStorage.
Link copied to clipboard
public RecordStorage<I> createRecordStorage<I>(ContextSpec context, Class<? extends Entity<I, ? extends Object>> entityClass)
Creates a new RecordStorage.
Link copied to clipboard
Obtains the wrapped factory.
Link copied to clipboard
Wraps the given factory into a SystemAwareStorageFactory.