CustomCheckpointRequestConnector
A PowerSyncBackendConnector capable of requesting checkpoints.
Extend this class instead of PowerSyncBackendConnector when uploads are processed asynchronously by the backend (for example through a message queue): The sync client as part of the PowerSync Kotlin SDK generates a checkpoint request id and hands it to your backend via this class, which is responsible for creating a matching checkpoint once the uploads preceding the request have been processed. For more details, see asynchronous backend uploads.
To use this connector, using com.powersync.sync.CheckpointMode.Requests is required. Note that this requires PowerSync service version 1.24.0 or later.
Functions
Get credentials for PowerSync.
Get credentials current cached, or fetch new credentials if none are available.
Immediately invalidate credentials.
Posts a client-generated checkpoint request to the backend and returns the effective checkpoint request state.
Fetch a new set of credentials and cache it.
If no other task is currently fetching credentials, calls fetchCredentials again and caches the result internally.
Upload local changes to the app backend.