Interface ISharedData
- Namespace
- Scaleout.Streaming.DigitalTwin.Core
- Assembly
- ScaleOut.Streaming.DigitalTwin.Core.dll
Provides access to objects that are shared between model instances.
public interface ISharedData
Methods
Clear()
Clears all objects from the cache.
ICacheResult Clear()
Returns
- ICacheResult
ICacheResult containing the outcome of the operation.
Remarks
The Status property of the returned result will contain the following CacheOperationStatus:
Status | Description |
---|---|
CacheCleared | The shared data repository was successfully cleared. |
Get(string)
Retrieves an existing object from the cache.
ICacheResult Get(string key)
Parameters
key
stringIdentifier of the object in the cache.
Returns
- ICacheResult
ICacheResult containing the outcome of the operation and the retrieved object (if successful).
Remarks
The Status property of the returned result will contain one of the following CacheOperationStatus outcomes:
Status | Description |
---|---|
ObjectRetrieved | The object was successfully retrieved. |
ObjectDoesNotExist | The requested object was not found. |
Put(string, byte[])
Adds or updates an object in the cache.
ICacheResult Put(string key, byte[] value)
Parameters
Returns
- ICacheResult
ICacheResult containing the outcome of the operation.
Remarks
The Status property of the returned result will contain the following CacheOperationStatus:
Status | Description |
---|---|
ObjectPut | The object was successfully put into the shared data repository. |
Remove(string)
Removes an object from the cache.
ICacheResult Remove(string key)
Parameters
key
stringIdentifier of the object in the cache.
Returns
- ICacheResult
ICacheResult containing the outcome of the operation.
Remarks
The Status property of the returned result will contain the following CacheOperationStatus:
Status | Description |
---|---|
ObjectRemoved | The object was successfully removed from the shared data repository. |