Skip to main content

SharedWebStreamingSyncImplementation

The local part of the sync implementation on the web, which talks to a sync implementation hosted in a shared worker.

Extends​

Constructors​

Constructor​

new SharedWebStreamingSyncImplementation(options): SharedWebStreamingSyncImplementation;

Parameters​

ParameterType
optionsSharedWebStreamingSyncImplementationOptions

Returns​

SharedWebStreamingSyncImplementation

Overrides​

WebStreamingSyncImplementation.constructor

Properties​

PropertyTypeInherited from
syncStatusSyncStatusSnapshotWebStreamingSyncImplementation.syncStatus

Accessors​

isConnected​

Get Signature​

get isConnected(): boolean;
Returns​

boolean

Inherited from​

WebStreamingSyncImplementation.isConnected


lastSyncedAt​

Get Signature​

get lastSyncedAt(): Date | undefined;
Returns​

Date | undefined

Inherited from​

WebStreamingSyncImplementation.lastSyncedAt


webOptions​

Get Signature​

get webOptions(): WebStreamingSyncImplementationOptions;
Returns​

WebStreamingSyncImplementationOptions

Inherited from​

WebStreamingSyncImplementation.webOptions

Methods​

connect()​

connect(options): Promise<void>;

Starts the sync process, this effectively acts as a call to connect if not yet connected.

Parameters​

ParameterType
optionsResolvedSyncOptions

Returns​

Promise<void>

Overrides​

WebStreamingSyncImplementation.connect


disconnect()​

disconnect(): Promise<void>;

Disconnects from the sync services.

Returns​

Promise<void>

Throws​

if not connected or if abort is not controlled internally

Overrides​

WebStreamingSyncImplementation.disconnect


dispose()​

dispose(): Promise<void>;

Returns​

Promise<void>

Overrides​

WebStreamingSyncImplementation.dispose


iterateAsyncListeners()​

iterateAsyncListeners(cb): Promise<void>;

Parameters​

ParameterType
cb(listener) => Promise<any>

Returns​

Promise<void>

Inherited from​

WebStreamingSyncImplementation.iterateAsyncListeners


iterateListeners()​

iterateListeners(cb): void;

Parameters​

ParameterType
cb(listener) => any

Returns​

void

Inherited from​

WebStreamingSyncImplementation.iterateListeners


markConnectionMayHaveChanged()​

markConnectionMayHaveChanged(): void;

Returns​

void

Inherited from​

WebStreamingSyncImplementation.markConnectionMayHaveChanged


obtainLock()​

obtainLock<T>(lockOptions): Promise<T>;

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
lockOptionsLockOptions<T>

Returns​

Promise<T>

Inherited from​

WebStreamingSyncImplementation.obtainLock


registerListener()​

registerListener(listener): () => void;

Register a listener for updates to the PowerSync client.

Parameters​

ParameterType
listenerPartial<T>

Returns​

() => void

Inherited from​

WebStreamingSyncImplementation.registerListener


requestCheckpoint()​

requestCheckpoint(): Promise<bigint>;

Returns​

Promise<bigint>

Overrides​

WebStreamingSyncImplementation.requestCheckpoint


triggerCrudUpload()​

triggerCrudUpload(): void;

Returns​

void

Inherited from​

WebStreamingSyncImplementation.triggerCrudUpload


updateSubscriptions()​

updateSubscriptions(subscriptions): void;

Parameters​

ParameterType
subscriptionsSubscribedStream[]

Returns​

void

Overrides​

WebStreamingSyncImplementation.updateSubscriptions


waitForReady()​

waitForReady(): Promise<void>;

Returns​

Promise<void>

Overrides​

WebStreamingSyncImplementation.waitForReady


waitUntilStatusMatches()​

waitUntilStatusMatches(predicate): Promise<void>;

Parameters​

ParameterType
predicate(status) => boolean

Returns​

Promise<void>

Inherited from​

WebStreamingSyncImplementation.waitUntilStatusMatches