@univerjsrpcclassesDatasyncprimarycontroller

@univerjs/rpc v0.5.4


Class: DataSyncPrimaryController

Defined in: submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:45

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

Defined in: submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:52

Parameters

ParameterType
_injectorInjector
_commandServiceICommandService
_univerInstanceServiceIUniverInstanceService
_rpcChannelServiceIRPCChannelService
_remoteSyncServiceIRemoteSyncService

Returns

DataSyncPrimaryController

Overrides

RxDisposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
dispose$protectedSubject<void>undefinedRxDisposable.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:120

Methods

dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:122

Returns

void

Inherited from

RxDisposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

RxDisposable.ensureNotDisposed


registerSyncingMutations()

registerSyncingMutations(mutation): void

Defined in: submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:65

Parameters

ParameterType
mutationIMutation<object>

Returns

void


syncUnit()

syncUnit(unitId): IDisposable

Defined in: submodules/univer/packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:73

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

ParameterType
unitIdstring

Returns

IDisposable