17.107. Interface IObjectStorage
Namespace: ArmoniK.Core.Base
Assembly: ArmoniK.Core.Base.dll
Object Storage interface It is used to store data in ArmoniK
public interface IObjectStorage : IInitializable, IHealthCheckProvider
17.107.1. Implements
17.107.2. Methods
17.107.2.1. AddOrUpdateAsync(ObjectData, IAsyncEnumerable<ReadOnlyMemory<byte>>, CancellationToken)
Add the given data in the storage at the given key Update data if it already exists
Task<(byte[] id, long size)> AddOrUpdateAsync(ObjectData data, IAsyncEnumerable<ReadOnlyMemory<byte>> valueChunks, CancellationToken cancellationToken = default)
17.107.2.1.1. Parameters
data ObjectData
valueChunks IAsyncEnumerable<ReadOnlyMemory<byte>>
Chunks of data that will be stored in the Object Storage
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.107.2.1.2. Returns
The opaque unique identifier representing the object and the size of the object that has been uploaded.
17.107.2.1.3. Remarks
Opaque ID will be used to refer to the object. The implementation of this interface should generate it.
17.107.2.1.4. Exceptions
the key is not found
17.107.2.2. GetSizesAsync(IEnumerable<byte[]>, CancellationToken)
Check if the given keys are existing in the object storage
Task<IDictionary<byte[], long?>> GetSizesAsync(IEnumerable<byte[]> ids, CancellationToken cancellationToken = default)
17.107.2.2.1. Parameters
ids IEnumerable<byte[]>
Opaque unique identifiers representing the objects to check
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.107.2.2.2. Returns
Task<IDictionary<byte[], long?>>
A map giving the results size if it exits, null otherwise
17.107.2.3. GetValuesAsync(byte[], CancellationToken)
Get object in the Object Storage
IAsyncEnumerable<byte[]> GetValuesAsync(byte[] id, CancellationToken cancellationToken = default)
17.107.2.3.1. Parameters
id byte[]
Opaque unique identifier representing the object
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.107.2.3.2. Returns
Byte arrays representing the object chunked
17.107.2.3.3. Exceptions
the key is not found
17.107.2.4. TryDeleteAsync(IEnumerable<byte[]>, CancellationToken)
Delete data in the object storage
Task TryDeleteAsync(IEnumerable<byte[]> ids, CancellationToken cancellationToken = default)
17.107.2.4.1. Parameters
ids IEnumerable<byte[]>
Opaque unique identifiers representing the objects to delete
cancellationToken CancellationToken
Token used to cancel the execution of the method
17.107.2.4.2. Returns
Task representing the asynchronous execution of the method
17.107.2.4.3. Exceptions
the key is not found