UNPKG

barracuda-client-api

Version:

API Client to connect to Barracuda Enterprise Service Bus

29 lines (28 loc) 2.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BarracudaRecoveryPolicy = void 0; var BarracudaRecoveryPolicy; (function (BarracudaRecoveryPolicy) { BarracudaRecoveryPolicy[BarracudaRecoveryPolicy["None"] = 0] = "None"; /** * For every previously interrupted subscription, this policy will trigger subscribe only portion which will get future updates. * For example, if your last active request was BarracudaBridgeReadQueryCommands.snapshotAndSubscribe, only the Subscribe will be instated. * NOTE: Use this when you only care about recovering for future updates, for example latest stock price updates. * @type {BarracudaRecoveryPolicy.ResubscribeAllInterruptedSubscriptions} */ BarracudaRecoveryPolicy[BarracudaRecoveryPolicy["ResubscribeAllInterruptedSubscriptions"] = 1] = "ResubscribeAllInterruptedSubscriptions"; /** * For every previously interrupted subscription, this policy will trigger a replay of that entire request with the same parameters. * For example, if your last active request was BarracudaBridgeReadQueryCommands.snapshotAndSubscribe, the entire snapshotAndSubscribe will be replayed. * NOTE: Use this when you can't just recover latest changes, for example, Order blotter, which could have had new orders while the connection is down. * @type {BarracudaRecoveryPolicy.ReplayAllInterruptedSubscriptions} */ BarracudaRecoveryPolicy[BarracudaRecoveryPolicy["ReplayAllInterruptedSubscriptions"] = 2] = "ReplayAllInterruptedSubscriptions"; /** * For every previously executed request during the life time of this BCjs instance, this policy will trigger a replay of that entire request with the same parameters. * For example, if BCjs made 10 requests, 9 for reference data that were processed, and one last active request, this policy will execute all 10 again, similar to RecoveryPolicy.ReplayAllInterruptedSubscriptions * NOTE: Use this when the application is a light weight app with minimum data requirement and needs a full refresh. For example mobile app that gets aggressively garbage collected. * @type {BarracudaRecoveryPolicy.ReplayAllRequests} */ BarracudaRecoveryPolicy[BarracudaRecoveryPolicy["ReplayAllRequests"] = 3] = "ReplayAllRequests"; })(BarracudaRecoveryPolicy = exports.BarracudaRecoveryPolicy || (exports.BarracudaRecoveryPolicy = {}));