UNPKG

ravendb

Version:
31 lines 1.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionWorker = void 0; const AbstractSubscriptionWorker_js_1 = require("./AbstractSubscriptionWorker.js"); const SubscriptionBatch_js_1 = require("./SubscriptionBatch.js"); const RequestExecutor_js_1 = require("../../Http/RequestExecutor.js"); class SubscriptionWorker extends AbstractSubscriptionWorker_js_1.AbstractSubscriptionWorker { _store; constructor(options, withRevisions, documentStore, dbName) { super(options, withRevisions, documentStore.getEffectiveDatabase(dbName)); this._store = documentStore; } getRequestExecutor() { return this._store.getRequestExecutor(this._dbName); } setLocalRequestExecutor(url, opts) { if (this._subscriptionLocalRequestExecutor) { this._subscriptionLocalRequestExecutor.dispose(); } this._subscriptionLocalRequestExecutor = RequestExecutor_js_1.RequestExecutor.createForSingleNodeWithoutConfigurationUpdates(url, this._dbName, opts); this._store.registerEvents(this._subscriptionLocalRequestExecutor); } createEmptyBatch() { return new SubscriptionBatch_js_1.SubscriptionBatch(this._documentType, this._revisions, this._subscriptionLocalRequestExecutor, this._store, this._dbName); } trySetRedirectNodeOnConnectToServer() { // no-op } } exports.SubscriptionWorker = SubscriptionWorker; //# sourceMappingURL=SubscriptionWorker.js.map