|
3 | 3 |
|
4 | 4 | import { Logger } from 'winston'; |
5 | 5 |
|
6 | | -import { ExecutionContext, TenantId } from '@dolittle/sdk.execution'; |
| 6 | +import { ExecutionContext, TenantIdLike } from '@dolittle/sdk.execution'; |
7 | 7 | import { Guid } from '@dolittle/rudiments'; |
8 | 8 |
|
9 | 9 | import { ProjectionsClient } from '@dolittle/runtime.contracts/Projections/Store_grpc_pb'; |
10 | 10 |
|
11 | 11 | import { IProjectionAssociations, IProjectionStore, ProjectionStore } from '..'; |
| 12 | +import { IProjectionStoreBuilder } from './IProjectionStoreBuilder'; |
12 | 13 |
|
13 | 14 | /** |
14 | | - * Represents a builder for builing a projection store. |
| 15 | + * Represents an implementation of {@link IProjectionsStoreBuilder}. |
15 | 16 | */ |
16 | | -export class ProjectionStoreBuilder { |
| 17 | +export class ProjectionStoreBuilder extends IProjectionStoreBuilder { |
17 | 18 |
|
| 19 | + /** |
| 20 | + * Initializes a new instance of {@link ProjectionStoreBuilder}. |
| 21 | + * @param {ProjectionsClient} projectionsClient The client for the projections. |
| 22 | + * @param {ExecutionContext} executionContext The execution context. |
| 23 | + * @param {IProjectionAssociations} projectionAssociations The projection associations. |
| 24 | + * @param {Logger} logger The logger. |
| 25 | + */ |
18 | 26 | constructor( |
19 | 27 | private readonly _projectionsClient: ProjectionsClient, |
20 | 28 | private readonly _executionContext: ExecutionContext, |
21 | 29 | private readonly _projectionAssociations: IProjectionAssociations, |
22 | 30 | private readonly _logger: Logger) { |
| 31 | + super(); |
23 | 32 | } |
24 | 33 |
|
25 | | - /** |
26 | | - * Build an {@link IProjectionStore} for the given tenant. |
27 | | - * @param {TenantId | Guid | string} tenantId The tenant id. |
28 | | - * @returns {IProjectionStore} The projection store. |
29 | | - */ |
30 | | - forTenant(tenantId: TenantId | Guid | string): IProjectionStore { |
| 34 | + /** @inheritdoc */ |
| 35 | + forTenant(tenantId: TenantIdLike): IProjectionStore { |
31 | 36 | const executionContext = this._executionContext |
32 | 37 | .forTenant(tenantId) |
33 | 38 | .forCorrelation(Guid.create()); |
|
0 commit comments