@univerjs/rpc v0.5.0-beta.1 • Docs
Class: DataSyncPrimaryController
This controller is responsible for syncing data from the primary thread to the worker thread.
Note that only spreadsheets will be synced to the remote calculation instance by default.
Extends
Constructors
new DataSyncPrimaryController()
new DataSyncPrimaryController(
_injector,
_commandService,
_univerInstanceService,
_rpcChannelService,
_remoteSyncService): DataSyncPrimaryController
Parameters
Parameter | Type |
---|---|
_injector | Injector |
_commandService | ICommandService |
_univerInstanceService | IUniverInstanceService |
_rpcChannelService | IRPCChannelService |
_remoteSyncService | IRemoteSyncService |
Returns
Overrides
Defined in
submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:52
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | RxDisposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:117 |
Methods
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:119
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
registerSyncingMutations()
registerSyncingMutations(mutation): void
Parameters
Parameter | Type |
---|---|
mutation | IMutation <object , boolean > |
Returns
void
Defined in
submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:65
syncUnit()
syncUnit(unitId): IDisposable
Only spreadsheets would be synced to the web worker in normal situations. If you would like to sync other types of documents, you should manually call this method with that document’s id.
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Defined in
submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:73