Skip to the content.

RingBufferPlus API:IRingBufferService

Build License NuGet Downloads

Back to List Api

IRingBufferService<T>

Namespace: RingBufferPlus

Represents the commands to RingBufferPlus service.

public interface IRingBufferService<T> : IRingBufferPlus, System.IDisposable

Type Parameters

T

Implements IRingBufferPlus, IDisposable

Properties

AccquireTimeout

Timeout to accquire buffer. Default value is 30 seconds.

public abstract TimeSpan AccquireTimeout { get; }

Property Value

TimeSpan

BufferHealtTimeout

The timeout for checking buffer integrity when there is no acquisition

public abstract TimeSpan BufferHealtTimeout { get; }

Property Value

TimeSpan

Capacity

Default capacity of ring buffer.

public abstract int Capacity { get; }

Property Value

Int32

FactoryIdleRetry

The delay time for retrying when a build fails. Default value is 30 seconds.

public abstract TimeSpan FactoryIdleRetry { get; }

Property Value

TimeSpan

FactoryTimeout

The timeout for build. Default value is 10 seconds.

public abstract TimeSpan FactoryTimeout { get; }

Property Value

TimeSpan

MaxCapacity

Maximum capacity.

public abstract int MaxCapacity { get; }

Property Value

Int32

MinCapacity

Minimum capacity.

public abstract int MinCapacity { get; }

Property Value

Int32

Name

Unique name to RingBuffer.

public abstract string Name { get; }

Property Value

String

RollbackFromMax

Condition to scale down to default capacity.
The free resource collected must be greater than or equal to value.

public abstract Nullable<Int32> RollbackFromMax { get; }

Property Value

Nullable<Int32>

RollbackFromMin

Condition to scale up to default capacity.
The free resource (averange collected) must be less than or equal to value.

public abstract Nullable<Int32> RollbackFromMin { get; }

Property Value

Nullable<Int32>

SamplesCount

Number of samples collected.Default value is baseunit/10. Default value is 60.

public abstract int SamplesCount { get; }

Property Value

Int32

SampleUnit

The TimeSpan interval to colleted samples.Default baseunit is 60 seconds.

public abstract TimeSpan SampleUnit { get; }

Property Value

TimeSpan

ScaleCapacity

If ring buffer hscapacity to scale

public abstract bool ScaleCapacity { get; }

Property Value

Boolean

ScaleToMax

Condition to scale up to max capacity.
The free resource collected must be less than or equal to value.

public abstract Nullable<Int32> ScaleToMax { get; }

Property Value

Nullable<Int32>

ScaleToMin

Condition to scale down to min capacity.
The free resource collected must be greater than or equal to value.

public abstract Nullable<Int32> ScaleToMin { get; }

Property Value

Nullable<Int32>

TriggerFromMax

Condition to scale down to default capacity foreach accquire.
The free resource collected at aqccquire must be greater than or equal to value.

public abstract Nullable<Int32> TriggerFromMax { get; }

Property Value

Nullable<Int32>

TriggerFromMin

Condition to trigger to default capacity (check at foreach accquire).
The free resource collected at aqccquire must be less than or equal to value.

public abstract Nullable<Int32> TriggerFromMin { get; }

Property Value

Nullable<Int32>

UserScale

The Scale Unit

public abstract ScaleMode UserScale { get; }

Property Value

ScaleMode

Methods

Accquire(Nullable<CancellationToken>)

Try Accquire value on buffer.
Will wait for a buffer item to become available or timeout (default 30 seconds).

RingBufferValue<T> Accquire(Nullable<CancellationToken> cancellation)

Parameters

cancellation Nullable<CancellationToken>
The CancellationToken.

Returns

RingBufferValue<T>.

SwithTo(ScaleSwith)

Manual Swith scale

void SwithTo(ScaleSwith value)

Parameters

value ScaleSwith
New scale capacity


Back to List Api