Skip to main content

ReactNativeStreamingSyncImplementation

Extends

  • AbstractStreamingSyncImplementation

Constructors

Constructor

new ReactNativeStreamingSyncImplementation(options): ReactNativeStreamingSyncImplementation;

Parameters

ParameterType
optionsAbstractStreamingSyncImplementationOptions

Returns

ReactNativeStreamingSyncImplementation

Overrides

AbstractStreamingSyncImplementation.constructor

Properties

PropertyTypeInherited from
locksMap<LockType, Mutex>-
syncStatusSyncStatusSnapshotAbstractStreamingSyncImplementation.syncStatus

Accessors

isConnected

Get Signature

get isConnected(): boolean;
Returns

boolean

Inherited from

AbstractStreamingSyncImplementation.isConnected

lastSyncedAt

Get Signature

get lastSyncedAt(): Date | undefined;
Returns

Date | undefined

Inherited from

AbstractStreamingSyncImplementation.lastSyncedAt

Methods

connect()

connect(options): Promise<void>;

Connects to the sync service

Parameters

ParameterType
optionsResolvedSyncOptions

Returns

Promise<void>

Inherited from

AbstractStreamingSyncImplementation.connect

disconnect()

disconnect(): Promise<void>;

Disconnects from the sync services.

Returns

Promise<void>

Throws

if not connected or if abort is not controlled internally

Inherited from

AbstractStreamingSyncImplementation.disconnect

dispose()

dispose(): Promise<void>;

Returns

Promise<void>

Inherited from

AbstractStreamingSyncImplementation.dispose

getWriteCheckpoint()

getWriteCheckpoint(): Promise<string>;

Returns

Promise<string>

Inherited from

AbstractStreamingSyncImplementation.getWriteCheckpoint

initLocks()

initLocks(): void;

Configures global locks on sync process

Returns

void


iterateAsyncListeners()

iterateAsyncListeners(cb): Promise<void>;

Parameters

ParameterType
cb(listener) => Promise<any>

Returns

Promise<void>

Inherited from

AbstractStreamingSyncImplementation.iterateAsyncListeners

iterateListeners()

iterateListeners(cb): void;

Parameters

ParameterType
cb(listener) => any

Returns

void

Inherited from

AbstractStreamingSyncImplementation.iterateListeners

markConnectionMayHaveChanged()

markConnectionMayHaveChanged(): void;

Returns

void

Inherited from

AbstractStreamingSyncImplementation.markConnectionMayHaveChanged

obtainLock()

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

Type Parameters

Type Parameter
T

Parameters

ParameterType
lockOptionsLockOptions<T>

Returns

Promise<T>

Overrides

AbstractStreamingSyncImplementation.obtainLock

registerListener()

registerListener(listener): () => void;

Register a listener for updates to the PowerSync client.

Parameters

ParameterType
listenerPartial<T>

Returns

() => void

Inherited from

AbstractStreamingSyncImplementation.registerListener

triggerCrudUpload()

triggerCrudUpload(): void;

Returns

void

Inherited from

AbstractStreamingSyncImplementation.triggerCrudUpload

updateSubscriptions()

updateSubscriptions(subscriptions): void;

Parameters

ParameterType
subscriptionsSubscribedStream[]

Returns

void

Inherited from

AbstractStreamingSyncImplementation.updateSubscriptions

waitForReady()

waitForReady(): Promise<void>;

Returns

Promise<void>

Inherited from

AbstractStreamingSyncImplementation.waitForReady

waitUntilStatusMatches()

waitUntilStatusMatches(predicate): Promise<void>;

Parameters

ParameterType
predicate(status) => boolean

Returns

Promise<void>

Inherited from

AbstractStreamingSyncImplementation.waitUntilStatusMatches