RingBufferPlus API:IRingBufferScaleCapacity
IRingBufferScaleCapacity<T>
Namespace: RingBufferPlus
Represents the scale capacity commands to RingBufferPlus.
public interface IRingBufferScaleCapacity<T>
Type Parameters
T
Type of buffer.
Methods
Build()
Validate and generate RingBufferPlus to service mode.
IRingBufferService<T> Build()
Returns
BuildWarmup(ref Boolean, Nullable<TimeSpan>)
Validate and generate RingBufferPlus and warmup with full capacity ready or reaching timeout (default 30 seconds).
IRingBufferService<T> BuildWarmup(ref Boolean fullcapacity, Nullable<TimeSpan> timeout)
Parameters
fullcapacity
Boolean&
True if Warmup has full capacity, otherwise false.
timeout
Nullable<TimeSpan>
The Timeout to Warmup has full capacity. Default value is 30 seconds.
Returns
MaxCapacity(Int32)
Maximum capacity.
IRingBufferScaleMax<T> MaxCapacity(int value)
Parameters
value
Int32
The maximum buffer.Value mus be greater or equal IRingBuffer<T>.Capacity(Int32)
Returns
MinCapacity(Int32)
Minimum capacity.
IRingBufferScaleMin<T> MinCapacity(int value)
Parameters
value
Int32
The minimal buffer. Value mus be greater or equal 1
Returns
ReportScale(Action<RingBufferMetric, ILogger, Nullable<CancellationToken>>)
Extension point when capacity was changed.
Executes asynchronously.
IRingBufferScaleCapacity<T> ReportScale(Action<RingBufferMetric, ILogger, Nullable<CancellationToken>> report)
Parameters
report
Action<RingBufferMetric, ILogger, Nullable<CancellationToken>>
The handler to action.
Returns
Slave(IRingBufferPlus)
Set slave ring buffer.
IRingBufferScaleCapacity<T> Slave(IRingBufferPlus slaveRingBuffer)
Parameters
slaveRingBuffer
IRingBufferPlus
The slave Ring buffer.