import { CacheStore } from "./cache_store";
export declare enum CacheOperation {
    del = "del",
    purgeTag = "purgeTag"
}
export interface CacheNotifyMessage {
    type: CacheOperation;
    ns: string;
    value: string;
    ts: number;
}
export interface ReceiveHandler {
    (msg: CacheNotifyMessage): void;
}
export interface CacheNotifierAdapter {
    send(op: CacheNotifyMessage): Promise<boolean>;
    start(handler: ReceiveHandler): void;
}
export declare class CacheNotifier {
    cacheStore: CacheStore;
    adapter: CacheNotifierAdapter;
    pid: string;
    constructor(cacheStore: CacheStore, adapter: CacheNotifierAdapter);
    send(type: CacheOperation, ns: string, value: string): Promise<boolean>;
    handle({ type, ns, value, ts }: CacheNotifyMessage): Promise<boolean>;
}
export declare function isCacheOperation(op: any): op is CacheOperation;
export declare class LocalCacheNotifier implements CacheNotifierAdapter {
    private _handler;
    send(msg: CacheNotifyMessage): Promise<boolean>;
    start(handler: ReceiveHandler): void;
}
export declare function defaultCacheNotifier(cacheStore: CacheStore): CacheNotifier;
