Table of Contents

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:

StatusDescription
CacheClearedThe shared data repository was successfully cleared.

Get(string)

Retrieves an existing object from the cache.

ICacheResult Get(string key)

Parameters

key string

Identifier 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:

StatusDescription
ObjectRetrievedThe 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

key string

Identifier of the object in the cache.

value byte[]

Value to be stored 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:

StatusDescription
ObjectPutThe object was successfully put into the shared data repository.

Remove(string)

Removes an object from the cache.

ICacheResult Remove(string key)

Parameters

key string

Identifier 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:

StatusDescription
ObjectRemovedThe object was successfully removed from the shared data repository.