Interface TenantSnapshotStoreFactory

All Known Implementing Classes:
AxonServerTenantSnapshotStoreFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Internal public interface TenantSnapshotStoreFactory
Factory providing the SnapshotStore of a single tenant.

The multi-tenant snapshot store calls this factory to obtain the store to route a tenant's snapshot load and store operations to. Implementations are expected to create the per-tenant store lazily and cache it.

The MultiTenantEventStorageEngine asks for a tenant's snapshot store once, when it composes that tenant's engine, and compares the two to decide whether the engine needs the store at all. An engine that is its own snapshot store is the one case where this factory is expected to return that very engine.

Since:
5.3.0
Author:
Stefan Dragisic, Laura Devriendt