Skip to main content

BareFileStore

@totemsdk/pear


@totemsdk/pear / BareFileStore

Class: BareFileStore

@totemsdk/pear — KVStore interface

Structurally identical to StorageAdapter from @totemsdk/core so that both BareKVStore and BareFileStore can be passed directly to LocalLeaseProvider, WotsWatermarkStore, and lookup-client storage slots without any adapter glue.

No import from @totemsdk/core is used here to keep this package dependency-free.

Implements​

Constructors​

Constructor​

new BareFileStore(options): BareFileStore

Parameters​

options​

BareFileStoreOptions

Returns​

BareFileStore

Methods​

clear()​

clear(): Promise<void>

Returns​

Promise<void>

Implementation of​

KVStore.clear


flush()​

flush(): Promise<void>

Writes are already durable; retained for shutdown-call compatibility.

Returns​

Promise<void>


get()​

get<T>(key): Promise<T | null>

Type Parameters​

T​

T

Parameters​

key​

string

Returns​

Promise<T | null>

Implementation of​

KVStore.get


has()​

has(key): Promise<boolean>

Parameters​

key​

string

Returns​

Promise<boolean>

Implementation of​

KVStore.has


keys()​

keys(): Promise<string[]>

Returns​

Promise<string[]>

Implementation of​

KVStore.keys


remove()​

remove(key): Promise<boolean>

Parameters​

key​

string

Returns​

Promise<boolean>

Implementation of​

KVStore.remove


set()​

set<T>(key, value): Promise<void>

Type Parameters​

T​

T

Parameters​

key​

string

value​

T

Returns​

Promise<void>

Implementation of​

KVStore.set