@thermopylae/lib.cache
Version:
21 lines (20 loc) • 812 B
TypeScript
import { Processor } from '@thermopylae/core.declarations';
import { BucketList } from './interface';
/**
* Data structures which keeps buckets identified by bucket key into EcmaScript 6 {@link Map}.
*
* @private
*/
declare class HashMapBucketList<BucketKey, BucketEntry> implements BucketList<BucketKey, BucketEntry> {
private readonly buckets;
constructor();
get numberOfBuckets(): number;
get size(): number;
add(bucketId: BucketKey, entry: BucketEntry): void;
has(bucketId: BucketKey, entry: BucketEntry): boolean;
move(fromBucketId: BucketKey, toBucketId: BucketKey, entry: BucketEntry): void;
remove(bucketId: BucketKey, entry: BucketEntry): void;
clear(): void;
dropBucket(bucketId: BucketKey, cb: Processor<BucketEntry>): void;
}
export { HashMapBucketList };