API Reference
@univerjs
@univerjs/rpc
classes
Datasyncprimarycontroller

@univerjs/rpc v0.4.2Docs


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

ParameterType
_injectorInjector
_commandServiceICommandService
_univerInstanceServiceIUniverInstanceService
_rpcChannelServiceIRPCChannelService
_remoteSyncServiceIRemoteSyncService

Returns

DataSyncPrimaryController

Overrides

RxDisposable.constructor

Defined in

packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:52 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
dispose$protectedSubject<void>undefinedRxDisposable.dispose$packages/core/src/shared/lifecycle.ts:117 (opens in a new tab)

Methods

dispose()

dispose(): void

Returns

void

Inherited from

RxDisposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:119 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

RxDisposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


registerSyncingMutations()

registerSyncingMutations(mutation): void

Parameters

ParameterType
mutationIMutation<object, boolean>

Returns

void

Defined in

packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:65 (opens in a new tab)


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

ParameterType
unitIdstring

Returns

IDisposable

Defined in

packages/rpc/src/controllers/data-sync/data-sync-primary.controller.ts:73 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.