Client Store


Purpose

Initiates and controls the data synchronization capability by means of the HTTP maps replication process, as well as enables initialization of the Store and Forward process.

Data chunking capability is enabled which permits to send large files in several smaller chunks during data synchronization. This capability also handles failures due to a user interaction or a network failure.

You can access the object using the launchbox.PRPC.ClientStore reference.

Module

This object belongs to the PRPC Client Store product module.

Constants

One of the following constants is passed in the errorCode parameter for the onStatusUpdate callback method to define the type of error that has occurred - see addListener.

Name Description
Error.ALREADY_STARTED Denotes that the operation is already in progress.
Error.AUTHENTICATION_FAILURE Denotes that the authentication process has failed.
Error.CLIENT_DB_FAILURE Denotes that an error related to the client database has occurred.
Error.CLIENT_PARSING_FAILURE Denotes that a parsing failure has occurred for the client.
Error.ILLEGAL_ARGUMENTS Denotes that illegal arguments have been passed.
Error.INTERNAL Denotes that an internal error has occurred.
Error.NETWORK_FAILURE Denotes that a network error has occurred.
Error.NOT_CONFIGURED Denotes that the ClientStore object has not yet been configured.
Error.SERVER_FAILURE Denotes that an error has occurred related to the server.
Error.SESSION_EXPIRED Denotes that network connectivity has been restored but session cookies have expired.

One of the following constants is passed in the event parameter for the onStatusUpdate callback method to define the type of event that has occurred - see addListener.

Name Description
Event.FAILED Denotes that the data synchronization operation has failed.
Event.STARTED Denotes that the data synchronization has started or has been resumed manually.
Event.STOPPED Denotes that the data synchronization has stopped or has been paused manually.
Event.SUCCEEDED Denotes that the data synchronization has successfully completed.

One of the following constants is passed in the phase parameter for the onProgress callback method to define the type of event that has occurred - see addListener.

Name Description
Progress.REQUEST_SENT Denotes that the first request to the server was sent successfully.
Progress.RESPONSE_INCOMING Denotes that the first command from the server was received.
Progress.RESPONSE_CONSUMED Denotes that the response was consumed in total.

Management methods

Name Return type Description
configure undefined

Configures the Client Store process.

start undefined

Starts or resumes the Client Store process.

addListener undefined

Adds a listener to the Client Store service.

removeListener undefined

Removes a listener previously added to the Client Store service.

stop undefined

The stop method pauses the Client Store process.

Replicated storage methods

Name Return type Description
batchExecute undefined

Enables grouping writeItem, getItems and runQuery calls to the Client Store API into a batch to be executed as a single transaction.

customTableSizes undefined

Retrieves the sizes of custom tables, based on a list passed in the tableNames object.

getItems undefined

Gets a list of items selected by specifying their type and handle.

getItemStats undefined

Returns statistics for all currently stored data items which are not being sychronized at this time.

writeItem undefined

Adds or updates an item within local storage.

getItemTypes undefined

Retrieves a list of item types for currently stored data items.

getOfflineStorageCount undefined

Retrieves a number of currently stored items.

deleteItem undefined

Deletes a specific item selected by specifying its type and handle.

clearItems undefined

Clears all items in local storage if data synchronization is not working.

runQuery undefined

This method provides access (with single record granularity) to data saved in the Client Store.

Forwardable storage methods

Name Return type Description
addAction undefined

Adds an action to the action queue.

listActions undefined

Retrieves a map of currently stored actions.

getQueuedActionsCount undefined

Retrieves a number of actions in the actions queue.

removeRejectedAction undefined

Removes rejected actions from the action queue.

removeAction undefined

Removes a specified action from the action queue.

Related topic

Public API reference
Legal notice | Copyright © 2016 and Confidential to Pegasystems Inc. All rights reserved
PDN | Hybrid Container | Feedback
Advanced...