1 | export interface IMessageIdProvider {
|
2 | allocate(): number | null;
|
3 | getLastAllocated(): number | null;
|
4 | register(num: number): boolean;
|
5 | deallocate(num: number): void;
|
6 | clear(): void;
|
7 | }
|
8 | export default class DefaultMessageIdProvider implements IMessageIdProvider {
|
9 | private nextId;
|
10 | constructor();
|
11 | allocate(): number;
|
12 | getLastAllocated(): number;
|
13 | register(messageId: number): boolean;
|
14 | deallocate(messageId: number): void;
|
15 | clear(): void;
|
16 | }
|