Class AdapterTransferLease
- Namespace
- MirrorPulse.Adapter.Sdk
- Assembly
- MirrorPulse.Adapter.Sdk.dll
Owns a temporary transfer file that is deleted when its stream closes.
public sealed class AdapterTransferLease : IAsyncDisposable
- Inheritance
-
AdapterTransferLease
- Implements
- Inherited Members
Remarks
Create the lease inside the transfer-cache directory granted by the Host. Dispose it on success, failure and session shutdown. After a cancellation, await cleanup before sending the acknowledgement.
Constructors
AdapterTransferLease(string)
public AdapterTransferLease(string transferCacheDirectory)
Parameters
transferCacheDirectorystring
Properties
CancellationToken
The token signaled when CancelAsync() is called.
public CancellationToken CancellationToken { get; }
Property Value
Path
public string Path { get; }
Property Value
Stream
The exclusive, readable and writable stream for the staged transfer.
public FileStream Stream { get; }
Property Value
Methods
CancelAsync()
Signals receiving work and disposes the staged transfer.
public ValueTask CancelAsync()
Returns
Remarks
An accepted backend mutation has its own recovery contract.
DisposeAsync()
public ValueTask DisposeAsync()