Skip to Content

PulsarAdapter<T>

PulsarAdapter<T> = OrbitGenericAdapter<TxAdapter<T>> & object & SyncCallbacks<T>

Defined in: packages/pulsar-core/src/types.ts:400 

The configuration of createPulsarStore: one or more chain adapters and the store options.

Type Parameters

T

T extends Transaction

The application transaction type.

Type Declaration

abortOnTxError?

optional abortOnTxError?: boolean

Whether an error thrown by beforeTxProcess aborts the transaction. Defaults to true. It does not apply to onRemoteCreate, whose errors never abort the transaction.

beforeTxProcess?

optional beforeTxProcess?: BeforeTxProcess

Global preflight callback run before every transaction. A beforeTxProcess passed to executeTxAction replaces it.

maxTransactions?

optional maxTransactions?: number

Maximum number of transactions in the pool. When it is full, the oldest finished ones (by localTimestamp) are evicted; pending transactions are never evicted, so while more of them are pending the pool holds more. Defaults to 50.

onTxFinished?

optional onTxFinished?: TxFinishedListener<T>

Called once when a transaction finishes (see TxFinishedListener), also when a tracker restarted after a page reload finishes it. Runs before the listeners added with subscribeTxFinished.

retentionDays?

optional retentionDays?: number | null

Days a finished transaction stays in the pool, counted from its finishedTimestamp (or localTimestamp when it has none). Expired ones are dropped when the saved state is restored and when a transaction is added; pending transactions stay until they finish. null keeps finished transactions until maxTransactions evicts them. Defaults to 30.

Last updated on