CombinedParallelSampleBandwidthEstimator.Builder


class CombinedParallelSampleBandwidthEstimator.Builder


A builder to create CombinedParallelSampleBandwidthEstimator instances.

Summary

Public constructors

Creates a new builder instance.

Public functions

CombinedParallelSampleBandwidthEstimator!
CombinedParallelSampleBandwidthEstimator.Builder!

Sets the BandwidthStatistic to be used by the estimator.

CombinedParallelSampleBandwidthEstimator.Builder!

Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate.

CombinedParallelSampleBandwidthEstimator.Builder!

Sets a minimum threshold of samples that need to be taken before the estimator can return a bandwidth estimate.

Public constructors

Builder

Builder()

Creates a new builder instance.

Public functions

setBandwidthStatistic

@CanIgnoreReturnValue
fun setBandwidthStatistic(bandwidthStatistic: BandwidthStatistic!): CombinedParallelSampleBandwidthEstimator.Builder!

Sets the BandwidthStatistic to be used by the estimator. By default, this is set to a SlidingWeightedAverageBandwidthStatistic.

Parameters
bandwidthStatistic: BandwidthStatistic!

The BandwidthStatistic.

Returns
CombinedParallelSampleBandwidthEstimator.Builder!

This builder for convenience.

setMinBytesTransferred

@CanIgnoreReturnValue
fun setMinBytesTransferred(minBytesTransferred: Long): CombinedParallelSampleBandwidthEstimator.Builder!

Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate. By default, this is set to 0.

Parameters
minBytesTransferred: Long

The minimum number of transferred bytes.

Returns
CombinedParallelSampleBandwidthEstimator.Builder!

This builder for convenience.

setMinSamples

@CanIgnoreReturnValue
fun setMinSamples(minSamples: Int): CombinedParallelSampleBandwidthEstimator.Builder!

Sets a minimum threshold of samples that need to be taken before the estimator can return a bandwidth estimate. By default, this is set to 0.

Parameters
minSamples: Int

The minimum number of samples.

Returns
CombinedParallelSampleBandwidthEstimator.Builder!

This builder for convenience.