import ChunkLookupMixins from 'causal-net/packages/causality-representation/src/Lookup/chunkLookup.mixins.js'
ChunkLookupMixins
Extends:
This ChunkLookupMixins class provide mixins for chunk lookup that first look from the cached chunk then fetch and cache new chunk
Member Summary
Public Members | ||
public get |
ChunkLookUp: * Return the storage lookup function |
Method Summary
Public Methods | ||
public |
async queryChunk(chunkId: String | Number ): Object Query chunk either read from file or fetch from remote server |
|
public |
async updateChunkLookUp(chunkId: String | Number , chunk: Object ): String Update the storage lookup |
Public Members
Public Methods
public async queryChunk(chunkId: String | Number ): Object source
Query chunk either read from file or fetch from remote server
Params:
Name | Type | Attribute | Description |
chunkId | String | Number | id in positive interger range |
Return:
Object | chunk object containing token keys and correponding vec value |
public async updateChunkLookUp(chunkId: String | Number , chunk: Object ): String source
Update the storage lookup
Params:
Name | Type | Attribute | Description |
chunkId | String | Number | id in positive integer range |
|
chunk | Object | chunk object containing token keys and correponding vec value |
Return:
String | updated chunk path in storage |