@orbit/coordinator
Version:
A coordinator and set of coordination strategies for managing data flow and keeping @orbit/data sources in sync.
26 lines (25 loc) • 1.22 kB
TypeScript
import { Coordinator, ActivationOptions } from '../coordinator';
import { Strategy, StrategyOptions } from '../strategy';
import { Listener } from '@orbit/core';
import { Source } from '@orbit/data';
import { Dict } from '@orbit/utils';
export interface EventLoggingStrategyOptions extends StrategyOptions {
events?: string[];
interfaces?: string[];
}
export declare class EventLoggingStrategy extends Strategy {
protected _events?: string[];
protected _interfaces?: string[];
protected _eventListeners?: Dict<Dict<Listener>>;
constructor(options?: EventLoggingStrategyOptions);
activate(coordinator: Coordinator, options?: ActivationOptions): Promise<void>;
deactivate(): Promise<void>;
protected _activateSource(source: Source): void;
protected _deactivateSource(source: Source): void;
protected _sourceEvents(source: Source): string[];
protected _sourceInterfaces(source: Source): string[];
protected _interfaceEvents(interfaceName: string): string[];
protected _addListener(source: Source, event: string): void;
protected _removeListener(source: Source, event: string): void;
protected _generateListener(source: Source, event: string): Listener;
}