Show / Hide Table of Contents

Class PersistentChannel<TInput, TOutput>

Represents persistent unbounded channel.

Inheritance
Object
PersistentChannel<TInput, TOutput>
Implements
IDisposable
Namespace: DotNext.Threading.Channels
Assembly: DotNext.Threading.dll
Syntax
public abstract class PersistentChannel<TInput, TOutput> : Channel<TInput, TOutput>, IChannelWriter<TInput>, IChannelReader<TOutput>, IChannel, IDisposable
Type Parameters
Name Description
TInput

Specifies the type of data that may be written to the channel.

TOutput

Specifies the type of data that may be read from the channel.

Constructors

| Improve this Doc View Source

PersistentChannel(PersistentChannelOptions)

Initializes a new persistent channel with the specified options.

Declaration
protected PersistentChannel(PersistentChannelOptions options)
Parameters
Type Name Description
PersistentChannelOptions options

The options of the channel.

Properties

| Improve this Doc View Source

Throughput

Gets ratio between number of consumed and produced messages.

Declaration
public double Throughput { get; }
Property Value
Type Description
Double

Methods

| Improve this Doc View Source

DeserializeAsync(Stream, CancellationToken)

Deserializes message from stream asynchronously.

Declaration
protected abstract ValueTask<TOutput> DeserializeAsync(Stream input, CancellationToken token)
Parameters
Type Name Description
Stream input

The stream containing serialized message.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask<TOutput>

Deserialized message.

| Improve this Doc View Source

Dispose()

Releases all resources associated with this channel.

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Releases managed and, optionally, unmanaged resources associated with this channel.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true to dispose all resources; false to release unmanaged resources only.

| Improve this Doc View Source

Finalize()

Releases file handles associated with this channel.

Declaration
protected void Finalize()
| Improve this Doc View Source

SerializeAsync(TInput, Stream, CancellationToken)

Serializes message to stream asynchronously.

Declaration
protected abstract ValueTask SerializeAsync(TInput input, Stream output, CancellationToken token)
Parameters
Type Name Description
TInput input

The message to serialize.

Stream output

The stream used to serialize object.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask

The task representing asynchronous state of operation.

Implements

IDisposable

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
ExpressionBuilder.Const<T>(T)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX