RingBufferPlus API:IRingBufferService
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
BufferHealtTimeout
The timeout for checking buffer integrity when there is no acquisition
public abstract TimeSpan BufferHealtTimeout { get; }
Property Value
Capacity
Default capacity of ring buffer.
public abstract int Capacity { get; }
Property Value
FactoryIdleRetry
The delay time for retrying when a build fails. Default value is 30 seconds.
public abstract TimeSpan FactoryIdleRetry { get; }
Property Value
FactoryTimeout
The timeout for build. Default value is 10 seconds.
public abstract TimeSpan FactoryTimeout { get; }
Property Value
MaxCapacity
Maximum capacity.
public abstract int MaxCapacity { get; }
Property Value
MinCapacity
Minimum capacity.
public abstract int MinCapacity { get; }
Property Value
Name
Unique name to RingBuffer.
public abstract string Name { get; }
Property Value
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
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
SamplesCount
Number of samples collected.Default value is baseunit/10. Default value is 60.
public abstract int SamplesCount { get; }
Property Value
SampleUnit
The TimeSpan interval to colleted samples.Default baseunit is 60 seconds.
public abstract TimeSpan SampleUnit { get; }
Property Value
ScaleCapacity
If ring buffer hscapacity to scale
public abstract bool ScaleCapacity { get; }
Property Value
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
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
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
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
UserScale
The Scale Unit
public abstract ScaleMode UserScale { get; }
Property Value
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
SwithTo(ScaleSwith)
Manual Swith scale
void SwithTo(ScaleSwith value)
Parameters
value
ScaleSwith
New scale capacity