import { Chunk } from './chunk/chunk'; import { ChunkId, Table } from './interface'; interface ChunkState { chunkRef: Chunk; size: number; expiresAt: number; } /** * InMemoryPool is a subset of ChunkPool abstraction * This pool saves rows in chunks that are stored in process memory * * @warning storing data in process memory can lead you to LOSS OF CONSISTANCE * but instead of this disadvantage you gain the cheapest and the most simple way to work * with clickhouse * * Data loss can only occur in two cases: * 1. When OS sends to a process SIGKILL code which is killing your process without grace * 2. When some piece of data contains anomalies such as `undefined` etc */ export declare class ChunkRegistry { #private; /** * Create InMemoryPool instance */ constructor(); increaseSize(id: ChunkId, delta: number): void; decreaseSize(id: ChunkId, delta: number): void; register(chunk: Chunk): void; unregister(id: ChunkId): void; getOne(id: ChunkId): ChunkState; getAll(): ChunkState[]; isEmpty(): boolean; getTables(): Table[]; getChunks(): ChunkId[]; } export {};