PGliteNotificationBatcherOptions
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:39
PGliteNotificationBatcher 的入参。
Properties
batchTimeout?
readonly optional batchTimeout?: number;
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:45
trailing 防抖间隔(毫秒),默认 DEFAULT_NOTIFY_BATCH_TIMEOUT_MS。
emit
readonly emit: (event) => void;
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:43
冲刷时派发一条聚合后的变更事件。
Parameters
| Parameter | Type |
|---|---|
event | PGliteChangeEvent |
Returns
void
maxBatchWait?
readonly optional maxBatchWait?: number;
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:47
窗口硬上限(毫秒),默认 DEFAULT_NOTIFY_MAX_BATCH_WAIT_MS。
maxPendingEvents?
readonly optional maxPendingEvents?: number;
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:49
窗口容量上限,默认 DEFAULT_NOTIFY_MAX_PENDING_EVENTS。
onParseError?
readonly optional onParseError?: (error) => void;
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:51
解析 payload 失败时的上报口;不传则丢弃。
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
void
resolveDbName
readonly resolveDbName: () => string;
Defined in: packages/rxdb-adapter-pglite/src/notify/notification-batcher.ts:41
取当前数据库名;用 getter 而不是值,是因为 init() 之后它才确定。
Returns
string