IDocumentService Interface
To use, import via @fluidframework/driver-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IDocumentService extends IEventProvider<IDocumentServiceEvents>
Extends: IEventProvider<IDocumentServiceEvents>
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
policies | Alpha |
optional |
IDocumentServicePolicies | Policies implemented/instructed by driver. |
resolvedUrl | Alpha |
IResolvedUrl |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
connectToDeltaStorage() | Alpha |
Promise<IDocumentDeltaStorageService> | Access to delta storage associated with the document |
connectToDeltaStream(client) | Alpha |
Promise<IDocumentDeltaConnection> | Subscribes to the document delta stream |
connectToStorage() | Alpha |
Promise<IDocumentStorageService> | Access to storage associated with the document |
dispose(error) | Alpha |
void | Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed). Useful for storage to commit any pending state if any (including any local caching). Please note that it does not remove the need for caller to close all active delta connections, as storage may not be tracking such objects. |
Property Details
policies
Policies implemented/instructed by driver.
To use, import via @fluidframework/driver-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
policies?: IDocumentServicePolicies;
Type: IDocumentServicePolicies
resolvedUrl
To use, import via @fluidframework/driver-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
resolvedUrl: IResolvedUrl;
Type: IResolvedUrl
Method Details
connectToDeltaStorage
Access to delta storage associated with the document
To use, import via @fluidframework/driver-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;
Returns
Return type: Promise<IDocumentDeltaStorageService>
connectToDeltaStream
Subscribes to the document delta stream
To use, import via @fluidframework/driver-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;
Parameters
Parameter | Type | Description |
---|---|---|
client | IClient |
Returns
Return type: Promise<IDocumentDeltaConnection>
connectToStorage
Access to storage associated with the document
To use, import via @fluidframework/driver-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
connectToStorage(): Promise<IDocumentStorageService>;
Returns
Return type: Promise<IDocumentStorageService>
dispose
Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed). Useful for storage to commit any pending state if any (including any local caching). Please note that it does not remove the need for caller to close all active delta connections, as storage may not be tracking such objects.
To use, import via @fluidframework/driver-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
dispose(error?: any): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
error | optional | any | tells if container (and storage) are closed due to critical error. Error might be due to disconnect between client & server knowledge about file, like file being overwritten in storage, but client having stale local cache. If driver implements any kind of local caching, such caches needs to be cleared on on critical errors. |