Interface MultiTenantAwareComponent
- All Superinterfaces:
DescribableComponent
- All Known Subinterfaces:
TenantComponentProvider<T>
- All Known Implementing Classes:
AxonServerTenantEventStorageEngineFactory,AxonServerTenantSnapshotStoreFactory,MultiTenantAxonServerCommandBusConnector,MultiTenantAxonServerQueryBusConnector,MultiTenantEventStorageEngine,MultiTenantPersistentStreamEventSource,TenantScopedCache
Interface for components that can be registered with a
TenantProvider.- Since:
- 4.6.0
- Author:
- Stefan Dragisic
-
Method Summary
Modifier and TypeMethodDescriptionregisterAndStartTenant(TenantDescriptor tenantDescriptor) Registers the giventenantDescriptoras a known tenant with this multi-tenant aware component.registerTenant(TenantDescriptor tenantDescriptor) Registers the giventenantDescriptoras a known tenant with this multi-tenant aware component.Methods inherited from interface org.axonframework.common.infra.DescribableComponent
describeTo
-
Method Details
-
registerTenant
Registers the giventenantDescriptoras a known tenant with this multi-tenant aware component.The caller must retain the returned
Registrationand cancel it when the tenant is removed, since releasing the component's per-tenant resources rides on that cancellation.- Parameters:
tenantDescriptor- TheTenantDescriptorto register with this component.- Returns:
- A
Registrationused to deregister the giventenantDescriptor.
-
registerAndStartTenant
Registers the giventenantDescriptoras a known tenant with this multi-tenant aware component. If applicable, this task will construct a tenant segment and start it.- Parameters:
tenantDescriptor- TheTenantDescriptorto register with this component.- Returns:
- A
Registrationused to deregister the giventenantDescriptor.
-